/* =====================================================
   COMPONENTS
   (Uses variables defined in base.css)
=====================================================
*/

/* =====================================================
   AUTH & USER INFO
===================================================== */
.mobile_nav__auth {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.mobile_nav__auth .auth_section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}
.home_header__auth .auth_section {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-sm);
}

.auth_button {
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}
.auth_button--primary {
  background: var(--color-primary);
  color: #fff;
}
.auth_button--primary:hover {
  background: var(--color-primary-hover);
}
.auth_button--secondary {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.auth_button--secondary:hover {
  background: #f6f6f6;
}
.auth_button--logout {
  background: #fff;
  color: var(--color-error);
  border: 2px solid var(--color-error);
}
.auth_button--logout:hover {
  background: var(--color-error);
  color: #fff;
}
.mobile_nav__auth .auth_button--logout {
  width: 100%;
}

.user_info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
  padding: 10px;
  background: var(--color-light-bg);
  border-radius: var(--radius-md);
}
.user_avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}
.user_details {
  flex: 1;
  min-width: 0;
}
.user_name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user_email {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================
   CTA BUTTONS (Global/Homepage)
===================================================== */
.cta_container {
  display: flex;
  width: 100%;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  flex-wrap: wrap;
}
.cta_button {
  display: inline-block;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  white-space: nowrap;
}
/* Global style for icons in CTA buttons */
.cta_button i {
  margin-right: var(--spacing-xs);
}

.cta_button--primary {
  background: var(--color-primary);
  color: #fff;
}
.cta_button--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.cta_button--secondary {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.cta_button--secondary:hover {
  background: #f6f6f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.cta_button:active {
  transform: scale(.98);
}

/* Button style for light text on dark backgrounds (Hero) */
.cta_button--secondary-hero {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2); /* Shadow for readability */
}
.cta_button--secondary-hero:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

@media (min-width: 769px) {
  .cta_container {
    flex-direction: row;
    flex: .6;
    justify-content: center;
    padding: 0;
    gap: var(--spacing-md);
  }
  .cta_button {
    width: 100%;
    max-width: 280px;
    padding: 15px 36px;
    font-size: 17px;
  }
}
@media (min-width: 1200px) {
  .cta_button {
    max-width: 320px;
    padding: 17px 44px;
    font-size: 18px;
  }
}

/* =====================================================
   FORMS
===================================================== */
.form_group {
  display: flex;
  flex-direction: column;
}
.form_label {
  font-size: 15px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.form_input,
.form_select,
.form_textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background-color: var(--color-input-bg);
  transition: border-color var(--transition-medium), box-shadow var(--transition-medium);
}
.form_input:focus,
.form_select:focus,
.form_textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(51, 51, 51, .1);
}
.form_textarea {
  min-height: 120px;
  resize: vertical;
}

/* Checkbox style */
.form_group_checkbox {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}
.form_group_checkbox input {
  margin: 0;
  width: 16px;
  height: 16px;
}
.form_group_checkbox label {
  font-size: 15px;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
}

/* =====================================================
   SPINNER
===================================================== */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================================================
   LIGHTBOX
===================================================== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain; /* Trap scroll/pan gestures */
}
.lightbox_content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
  touch-action: auto; /* Allow all gestures (double-tap zoom) on the image itself */
}
.lightbox_close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}
.lightbox_close:hover,
.lightbox_close:focus {
  color: #bbb;
  text-decoration: none;
}

/* Lightbox Navigation Styles */
.lightbox_counter {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: #f1f1f1;
  font-size: 16px;
  font-weight: 500;
  z-index: 2010;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  pointer-events: none;
}

.lightbox_nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.3);
  color: #f1f1f1;
  border: none;
  font-size: 32px;
  font-weight: bold;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 2010;
  transition: background-color var(--transition-medium);
  border-radius: var(--radius-sm);
  user-select: none;
}
.lightbox_nav:hover {
  background-color: rgba(0, 0, 0, 0.6);
}
.lightbox_nav--prev {
  left: 20px;
}
.lightbox_nav--next {
  right: 20px;
}

/* =====================================================
   MODALS (Global Styles)
===================================================== */
.modal_overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal_content {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 5px 15px rgba(0,0,0,.3);
  width: 90%;
  max-width: 500px;
  position: relative;
}
.modal_close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--color-text-lighter);
  cursor: pointer;
}
.modal_content h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}
.modal_content p {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}
.modal_content .form_group {
  margin-bottom: var(--spacing-md);
}

/* =====================================================
   CARDS (General)
===================================================== */
.card_title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
}
.card_price {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: #000;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-light);
}
.card_features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-lg) 0;
  flex-grow: 1;
}
.card_features li {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card_features li::before {
  content: '✓';
  font-weight: 700;
  color: var(--color-primary);
  font-size: 18px;
}
.card_cta {
  width: 100%;
  margin-top: auto;
}

/* --- Pricing Cards (Legacy - Kept for potential future use) --- */
.pricing_card {
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
  border: 2px solid transparent;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}
.pricing_card--popular {
  border-color: var(--color-primary);
  position: relative;
}
.popular_badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  z-index: 2;
}
@media (min-width: 769px) {
  .pricing_card {
    padding: var(--spacing-xl);
  }
  .pricing_card--popular {
    transform: scale(1.05);
  }
  .pricing_card--popular:hover {
     transform: scale(1.07);
  }
  .pricing_card:not(.pricing_card--popular):hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
}

/* --- Gallery Item (Card) --- */
.gallery_item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  aspect-ratio: 4 / 3;
  cursor: pointer; /* Indicate clickability for lightbox */
}
.gallery_item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.gallery_item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================
   ACCORDION (FAQ/Pricing/Account)
===================================================== */
.faq_item {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.faq_question {
  display: block;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  position: relative;
  list-style: none; /* Hides default <details> arrow */
}
/* Hides default <details> arrow in WebKit */
.faq_question::-webkit-details-marker {
  display: none;
}
.faq_question::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--color-text-secondary);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform var(--transition-medium);
}
.faq_answer {
  padding: 0 24px 24px 24px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: 16px;
  border-top: 1px solid var(--color-border-light);
}
.faq_answer p {
  margin: 0;
  padding-top: var(--spacing-md);
}
.faq_item[open] > .faq_question {
  color: #000;
}
.faq_item[open] > .faq_question::after {
  content: '−';
  transform: translateY(-50%);
}

/* Counter badge for accordion header (Account/Admin) */
.accordion_counter_badge {
  font-size: 16px;
  font-weight: 500;
  color: #777;
}

/* =====================================================
   APPOINTMENT CARD (Account Page)
===================================================== */
.appointment_card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.appointment_card_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-light-bg);
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}
.appointment_card_header h4 {
  margin: 0;
  font-size: 18px;
}
.appointment_status {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.status_pending {
  background: #fff8e1;
  color: #f57f17;
}
.status_confirmed {
  background: #e8f5e9;
  color: var(--color-success);
}
.appointment_card_body {
  padding: var(--spacing-md);
  display: flex;
  gap: 20px;
}
.appointment_card_body p {
  margin: 0;
  font-size: 15px;
}

/* =====================================================
   NOTIFICATION BANNER SYSTEM
===================================================== */
#notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.notification-banner {
  padding: 15px 25px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

.notification-banner.show {
  opacity: 1;
  transform: translateY(0);
}

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

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