/* Chat styles for braider dashboard */

/* Chat Button */
.chat-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.chat-button:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

.appointment-card {
  position: relative;
  padding-bottom: 45px; /* Add some padding at the bottom for the chat button */
}

/* Chat Modal */
#chat-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

#chat-modal.open {
  display: flex;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 500px;
  height: 80%;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  transition: color 0.3s;
}

.close-button:hover {
  color: #333;
}

.chat-messages {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 130px);
}

.message {
  margin-bottom: 10px;
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
  word-wrap: break-word;
}

.message.sent {
  align-self: flex-end;
  background-color: #dcf8c6;
  border-bottom-right-radius: 5px;
}

.message.received {
  align-self: flex-start;
  background-color: #f1f0f0;
  border-bottom-left-radius: 5px;
}

.message.system {
  align-self: center;
  background-color: #f8f8f8;
  border-radius: 10px;
  font-style: italic;
  color: #777;
  max-width: 90%;
}

.message .time {
  font-size: 0.7rem;
  color: #999;
  margin-top: 5px;
  text-align: right;
}

.message .sender {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 3px;
}

.chat-input {
  border-top: 1px solid #eee;
  padding: 15px;
  display: flex;
  align-items: center;
}

.chat-input input {
  flex-grow: 1;
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 10px 15px;
  outline: none;
}

.chat-input button {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  margin-left: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.chat-input button:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

.chat-input button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Loading indicator for chat */
.chat-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.chat-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: #4CAF50;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  text-align: center;
  padding: 20px;
}

.chat-empty i {
  font-size: 3rem;
  margin-bottom: 15px;
}

.chat-empty p {
  font-size: 1rem;
  max-width: 80%;
}

/* ===== APPOINTMENT DETAILS STYLING ===== */
.appointment-details {
  margin-top: 0;
  margin-bottom: 15px;
  padding-right: 300px;
}

.appointment-details p {
  margin: 5px 0;
  line-height: 1.4;
}

/* Inspiration Photo Styling */
.inspiration-photo {
  margin-top: 10px;
  margin-bottom: 10px;
}

.inspiration-photo img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #d4a373;
  margin-top: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.inspiration-photo img:hover {
  transform: scale(1.05);
}

/* Notes styling */
.appointment-notes {
  margin-top: 10px;
  margin-bottom: 10px;
  font-style: italic;
  color: #5c4033;
  line-height: 1.4;
}

.appointment-notes strong {
  font-weight: bold;
  font-style: normal;
  margin-right: 5px;
  color: #5c4033;
}

/* Location styling */
.location-section {
  margin-top: 10px;
  margin-bottom: 10px;
}

.location-section p {
  margin: 5px 0;
  color: #5c4033;
  line-height: 1.4;
}

.location-section strong {
  font-weight: bold;
  margin-right: 5px;
  color: #5c4033;
}

/* Payment information in appointment cards */
.payment-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e0e0e0;
}

.payment-section p {
  margin: 5px 0;
  font-size: 0.9rem;
}

/* Appointment Expiry Countdown */
.expiry-countdown {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.85rem;
  color: #ff5722;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 5px 10px;
  border-radius: 4px;
  border: 2px solid #ff5722;
  display: flex;
  align-items: center;
  z-index: 10;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.expiry-countdown i {
  font-size: 0.9rem;
  margin-right: 5px;
}

.expiry-countdown .expiry-label {
  font-weight: 500;
  margin-right: 4px;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.expiry-countdown.urgent {
  color: #ff4444;
  animation: pulse 1s infinite;
}

/* View Braider Profile Button - Matching setup-profile-btn and logout-button */
.view-profile-btn {
  background-color: #d4a373; /* Match logout button color */
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.6rem 1.2rem; /* Match setup-profile-btn and logout-button padding */
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease; /* Match logout button transition */
  text-decoration: none;
  display: inline-block;
}

.view-profile-btn:hover {
  background-color: #b22222; /* Match logout button hover color */
}

/* Bottom Right Buttons Container - positioned relative to dashboard-container */
.bottom-right-buttons {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

/* Share Profile Button - Bottom Right Style */
.share-profile-btn.bottom-right-btn {
  background-color: #6c5ce7;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
}

.share-profile-btn.bottom-right-btn:hover {
  background-color: #5a4fcf;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
}

/* Share Profile Button */
.share-profile-btn {
  background-color: #6c5ce7;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.share-profile-btn:hover {
  background-color: #5a4fcf;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Share Profile Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  justify-content: center;
  align-items: center;
}

.share-modal .modal-content {
  width: 90%;
  max-width: 450px;
  height: auto;
  max-height: 80vh;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow-y: auto;
}

.share-modal .modal-body {
  padding: 20px;
}

.share-modal .form-group {
  margin-bottom: 20px;
}

.share-modal .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.share-modal .form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.share-modal .form-control:focus {
  outline: none;
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.share-modal textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.share-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}

.share-modal .primary-btn {
  background-color: #6c5ce7;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-modal .primary-btn:hover {
  background-color: #5a4fcf;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.share-modal .primary-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.share-modal .secondary-btn {
  background-color: transparent;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-modal .secondary-btn:hover {
  background-color: #f8f9fa;
  border-color: #bbb;
}

.success-message, .error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  font-weight: 500;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.success-message i {
  color: #28a745;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.error-message i {
  color: #dc3545;
}

/* ===== APPOINTMENT HISTORY (Client Dashboard Style) ===== */
.history-item {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid #eaeaea;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #eaeaea;
  cursor: pointer;
}

.history-date {
  font-weight: 600;
  color: #5c4033;
  font-size: 0.95rem;
}

.history-time {
  font-weight: 500;
  color: #5c4033;
  font-size: 0.9rem;
}

.history-braider {
  font-weight: 500;
  color: #5c4033;
  font-size: 0.9rem;
}

.history-style {
  font-weight: 500;
  color: #5c4033;
  font-size: 0.9rem;
}

.history-status {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.status-default {
  background-color: #e2e3e5;
  color: #383d41;
}

.history-item-details {
  padding: 15px;
}

.history-item-details p {
  margin: 5px 0;
  font-size: 0.95rem;
}

.expand-icon {
  font-size: 0.8rem;
  color: #666;
}

/* General styles for loading, error, and no-history messages */
.loading, .error, .no-history {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.loading {
  color: #007bff;
}

.error {
  color: #dc3545;
}

.no-history {
  color: #6c757d;
}

/* Inquiries Section */
.inquiries-disclaimer {
  margin-bottom: 2rem;
}

.inquiries-disclaimer .disclaimer-box {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1.5rem;
}

.inquiries-disclaimer .disclaimer-box h3 {
  margin: 0 0 1rem 0;
  color: #856404;
  font-size: 1.1rem;
}

.inquiries-disclaimer .disclaimer-box ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #856404;
}

.inquiries-disclaimer .disclaimer-box li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.inquiries-container {
  min-height: 200px;
}

.loading-state {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.inquiries-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.inquiry-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  overflow: hidden;
  transition: all 0.3s ease;
}

.inquiry-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inquiry-header {
  padding: 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inquiry-header:hover {
  background: #e9ecef;
}

.inquiry-client-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inquiry-client-name {
  font-weight: 600;
  color: #333;
}

.inquiry-last-message {
  color: #666;
  font-size: 0.9rem;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.inquiry-timestamp {
  color: #999;
  font-size: 0.8rem;
}

.inquiry-status {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.inquiry-status.client-last {
  background: #e3f2fd;
  color: #1976d2;
}

.inquiry-status.braider-last {
  background: #f3e5f5;
  color: #7b1fa2;
}

.inquiry-chat {
  display: none;
  border-top: 1px solid #ddd;
  background: white;
}

.inquiry-chat.expanded {
  display: block;
}

.inquiry-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
}

.inquiry-message {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.inquiry-message.sent {
  align-items: flex-end;
}

.inquiry-message.received {
  align-items: flex-start;
}

.inquiry-message-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  word-wrap: break-word;
  position: relative;
}

.inquiry-message.sent .inquiry-message-bubble {
  background: #5c4033;
  color: white;
  border-bottom-right-radius: 4px;
}

.inquiry-message.received .inquiry-message-bubble {
  background: white;
  color: #333;
  border: 1px solid #ddd;
  border-bottom-left-radius: 4px;
}

.inquiry-message-meta {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  padding: 0 0.5rem;
}

.inquiry-input-container {
  display: flex;
  padding: 1rem;
  gap: 0.5rem;
  background: white;
}

.inquiry-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
  max-height: 120px;
}

.inquiry-input:focus {
  outline: none;
  border-color: #5c4033;
  box-shadow: 0 0 0 2px rgba(92, 64, 51, 0.1);
}

.inquiry-send-btn {
  background: #5c4033;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.inquiry-send-btn:hover {
  background: #4a3428;
}

.inquiry-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.inquiry-messages::-webkit-scrollbar {
  width: 6px;
}

.inquiry-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.inquiry-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.inquiry-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Prevent FOUC - Hide all sections by default */
.main-content .card {
  display: none;
}

/* Show only the dashboard overview by default */
#dashboard-overview {
  display: block;
}

/* Loading state for dashboard */
.dashboard-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #666;
  font-size: 1rem;
}

.dashboard-loading .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: #4CAF50;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

/* Loading state for appointment lists */
.appointment-list .dashboard-loading {
  padding: 1rem;
  font-size: 0.9rem;
  color: #888;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fafafa;
}

.appointment-list .dashboard-loading .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* Chat styles for braider dashboard */ 