/* Comments Module Styles */

.comments-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.comments-header-icon {
  font-size: 16px;
}

.comment-thread {
  margin-bottom: 16px;
}

.comment-item {
  margin-bottom: 8px;
  padding: 8px 0;
  background: transparent;
  position: relative;
}

.comment-item.level-2 {
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid #e5e7eb;
  position: relative;
}

.comment-item.level-3 {
  margin-left: 48px;
  padding-left: 16px;
  border-left: 2px solid #e5e7eb;
  position: relative;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #878a8c;
}

.comment-author {
  font-weight: 600;
  color: #1a1a1b;
}

.comment-time {
  color: #878a8c;
}

.comment-text {
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1b;
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.comment-reply-btn {
  background: transparent;
  color: #878a8c;
  border: none;
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.comment-reply-btn:hover:not(:disabled) {
  background: #f6f7f8;
  color: #1a1a1b;
}

.comment-edit-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  font-size: 12px;
  color: #878a8c;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 2px;
}

.comment-edit-btn:hover {
  background: #f6f7f8;
  color: #1a1a1b;
}

.comment-reply-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.comment-delete-btn {
  background: transparent;
  border: none;
  color: #878a8c;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
  border-radius: 2px;
}

.comment-delete-btn:hover:not(:disabled) {
  background: #f6f7f8;
  color: #ea0027;
}

.comment-delete-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.comment-input-container {
  margin-top: 12px;
}

.comment-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  background: #fafafa;
}

.comment-input:focus {
  outline: none;
  border-color: #1a1a1b;
  background: #ffffff;
}

.comment-input-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  gap: 8px;
}

.comment-submit-btn {
  background: #0079d3;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.comment-submit-btn:hover:not(:disabled) {
  background: #005ba1;
}

.comment-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.comment-save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: 4px;
  color: #6c757d;
}

.comment-save-indicator.saving {
  color: #007bff;
}

.comment-save-indicator.saved {
  color: #28a745;
  animation: fadeOut 2s forwards;
}

.comment-save-indicator.error {
  color: #dc3545;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.comment-reply-input-container,
.comment-edit-input-container {
  margin-top: 8px;
  margin-left: 24px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.comment-edit-input-container {
  margin-left: 0;
  margin-top: 8px;
}

.comment-reply-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.comment-reply-cancel-btn,
.comment-reply-submit-btn,
.comment-edit-cancel-btn,
.comment-edit-submit-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.comment-reply-cancel-btn,
.comment-edit-cancel-btn {
  background: transparent;
  color: #878a8c;
  border: 1px solid #e5e7eb;
}

.comment-reply-cancel-btn:hover,
.comment-edit-cancel-btn:hover {
  background: #f6f7f8;
  color: #1a1a1b;
}

.comment-reply-submit-btn,
.comment-edit-submit-btn {
  background: #0079d3;
  color: white;
  font-weight: 700;
}

.comment-reply-submit-btn:hover:not(:disabled),
.comment-edit-submit-btn:hover:not(:disabled) {
  background: #005ba1;
}

.comment-reply-submit-btn:disabled,
.comment-edit-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Delete Confirmation Modal */
.delete-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

.delete-modal {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.2s;
}

.delete-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #222;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-modal-message {
  margin-bottom: 16px;
  color: #666;
  line-height: 1.5;
}

.delete-modal-count {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.delete-modal-count-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
}

.delete-modal-count-item:last-child {
  margin-bottom: 0;
}

.delete-modal-warning {
  color: #dc3545;
  font-size: 13px;
  margin-bottom: 16px;
}

.delete-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.delete-modal-cancel-btn,
.delete-modal-delete-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.delete-modal-cancel-btn {
  background: #f0f0f0;
  color: #333;
}

.delete-modal-cancel-btn:hover {
  background: #e0e0e0;
}

.delete-modal-delete-btn {
  background: #dc3545;
  color: white;
}

.delete-modal-delete-btn:hover {
  background: #c82333;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Orphaned Comments Section */
.orphaned-comments-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #ffc107;
}

.orphaned-comments-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.orphaned-comments-description {
  margin-bottom: 16px;
  color: #666;
  font-size: 14px;
}

.orphaned-reservation {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.orphaned-reservation-header {
  margin-bottom: 12px;
}

.orphaned-reservation-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: #222;
}

.orphaned-reservation-dates {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.orphaned-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #856404;
  font-size: 13px;
  font-style: italic;
  margin-bottom: 12px;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
  .comment-submit-btn {
    width: 100%;
    padding: 10px;
    font-size: 15px;
  }
  .comment-item.level-2 {
    margin-left: 12px;
  }

  .comment-item.level-3 {
    margin-left: 24px;
  }

  .comment-reply-input-container {
    margin-left: 12px;
  }

  .delete-modal {
    width: 95%;
    padding: 20px;
  }

  .delete-modal-actions {
    flex-direction: column;
  }

  .delete-modal-cancel-btn,
  .delete-modal-delete-btn {
    width: 100%;
  }
}

/* Empty State */
.comments-empty {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

.orphaned-empty {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}
