/* ----------------------------------------------------------------------------
 * Easy!Appointments - Online Appointment Scheduler
 *
 * @package     EasyAppointments
 * @author      A.Tselegidis <alextselegidis@gmail.com>
 * @copyright   Copyright (c) Alex Tselegidis
 * @license     https://opensource.org/licenses/GPL-3.0 - GPLv3
 * @link        https://easyappointments.org
 * @since       v1.5.0
 * ---------------------------------------------------------------------------- */

/* Match parent site typography */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500;600&display=swap');

body.in-iframe {
  --bs-body-font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
body.in-iframe .frame-title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
}
body.in-iframe .form-control,
body.in-iframe .form-select,
body.in-iframe .btn,
body.in-iframe label,
body.in-iframe .form-check-label {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
/* Responsive booking wizard styles (rounded corners and shadow on md+ screens) */
@media (min-width: 768px) {
  #book-appointment-wizard {
    border-radius: var(--bs-border-radius) !important;
    box-shadow: var(--bs-box-shadow-sm) !important;
  }
}
/* Active step indicator - dynamic state that changes via JavaScript */
#book-appointment-wizard .book-step.active-step {
  height: 45px !important;
  width: 45px !important;
  background: var(--bs-white) !important;
  padding: 7px !important;
  margin-right: 13px !important;
  margin-top: 0 !important;
}

#book-appointment-wizard .book-step.active-step strong {
  color: var(--bs-primary) !important;
  font-size: 21px !important;
}

/* Inactive step indicator - ensures consistent styling when step becomes inactive */
#book-appointment-wizard .book-step:not(.active-step) {
  height: 35px !important;
  width: 35px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  padding: 8px !important;
  margin-right: 12px !important;
  margin-top: 6px !important;
}

#book-appointment-wizard .book-step:not(.active-step) strong {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 12px !important;
}

/* Selected hour button state */
#book-appointment-wizard #available-hours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#book-appointment-wizard #available-hours .available-hour {
  margin-bottom: 0;
}

#book-appointment-wizard #available-hours .selected-hour {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: var(--bs-white) !important;
}

/* Captcha refresh icon hover effect */
#book-appointment-wizard .captcha-title .fa-sync-alt {
  cursor: pointer;
  transition: all 0.3s linear;
}

#book-appointment-wizard .captcha-title .fa-sync-alt:hover {
  color: var(--bs-primary);
}

/* Language popover list */
.popover .popover-title {
  text-align: center;
}

.popover .popover-content #language-list .language {
  margin: 15px 0;
}

#book-appointment-wizard .flatpickr-calendar.inline {
  margin: auto;
}

/* Force side-by-side layout for calendar + hours at a lower breakpoint
   so it works inside iframes narrower than 992px */
@media (min-width: 600px) {
  #wizard-frame-2 .frame-content > .col-12 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Hide footer when embedded in iframe */
#frame-footer { display: none !important; }

/* Match select-time height to flatpickr calendar when embedded */
body.in-iframe #select-time { max-width: none !important; padding-bottom: 0 !important; }
body.in-iframe #available-hours { max-height: none !important; }

/* Hide timezone everywhere when embedded */
body.in-iframe #select-timezone,
body.in-iframe label[for="select-timezone"] { display: none !important; }
body.in-iframe #select-time > .mb-3:first-child { display: none !important; }
body.in-iframe #appointment-details .mb-2:has(.fa-globe) { display: none !important; }

/* When embedded: remove outer spacing/shadow so the widget blends seamlessly */
body.in-iframe { background: #FFFFFF !important; }
body.in-iframe #main { padding: 0; }
body.in-iframe .wrapper { padding: 0 !important; }
body.in-iframe #book-appointment-wizard { box-shadow: none !important; border-radius: 0 !important; background: #FFFFFF !important; }

/* Hide entire header when embedded (replaced by service card) */
body.in-iframe #header { display: none !important; }

/* Service card — single-row flex: icon | details | price | steps */
body.in-iframe .service-card {
  margin: 0;
}
body.in-iframe .service-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #f8f6f2 0%, #f0ede6 100%);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
body.in-iframe .service-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
body.in-iframe .service-card-details {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1;
  min-width: 0;
}
body.in-iframe .service-card-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2e5038;
  line-height: 1.2;
}
body.in-iframe .service-card-provider {
  font-size: .82rem;
  color: #6b7c6f;
}
body.in-iframe .service-card-price {
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: #2e5038;
  background: #fff;
  border-radius: 8px;
  padding: .4rem .7rem;
  box-shadow: 0 1px 4px rgba(46,80,56,.1);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
body.in-iframe .service-card-price-label {
  font-weight: 400;
  font-size: .75rem;
  color: #6b7c6f;
}
body.in-iframe .service-card-steps {
  flex-shrink: 0;
  margin-left: auto;
}
body.in-iframe .service-card-steps #steps {
  width: auto !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  float: none !important;
}
body.in-iframe .service-card-steps .book-step {
  margin-top: 0 !important;
  float: none !important;
}

/* Service card mobile: stack price above steps */
@media (max-width: 600px) {
  body.in-iframe .service-card-inner {
    flex-wrap: wrap;
    gap: .75rem;
  }
  body.in-iframe .service-card-inner { justify-content: center; text-align: center; }
  body.in-iframe .service-card-icon { display: none; }
  body.in-iframe .service-card-details { flex: 1 1 100%; align-items: center; }
  body.in-iframe .service-card-price {
    order: 10;
    flex-basis: 100%;
    text-align: center;
  }
  body.in-iframe .service-card-steps {
    order: 11;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    margin-left: 0;
  }
}

/* Frame 4 (confirmation): match main site typography */
body.in-iframe #wizard-frame-4 .frame-title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: inherit !important;
}
body.in-iframe #wizard-frame-4 #appointment-details,
body.in-iframe #wizard-frame-4 #customer-details {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: .9rem !important;
  line-height: 1.6 !important;
}
body.in-iframe #wizard-frame-4 #appointment-details .fs-3,
body.in-iframe #wizard-frame-4 #customer-details .fs-3 {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}
body.in-iframe #wizard-frame-4 .frame-content {
  font-size: .9rem !important;
}
body.in-iframe #wizard-frame-4 .form-check-label {
  font-size: .85rem !important;
}
body.in-iframe #wizard-frame-4 .command-buttons .btn {
  font-size: .85rem !important;
  padding: .5rem 1.2rem !important;
}

/* Frame 5 — confirmation page (message_layout) when embedded in iframe */
body.in-iframe #message-frame {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: .9rem !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
}
body.in-iframe #message-frame h3 {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
}
body.in-iframe #message-frame .fs-5 {
  font-size: .9rem !important;
}
body.in-iframe #message-frame .btn {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: .85rem !important;
  padding: .5rem 1.2rem !important;
}
body.in-iframe #message-frame > .mt-2 { display: none !important; }

/* Reduce frame titles when embedded; hide on step 2 since the service card replaces it */
body.in-iframe .frame-title { font-size: 1.05rem !important; margin-bottom: 1rem !important; }
body.in-iframe #wizard-frame-2 .frame-title { display: none !important; }
body.in-iframe .frame-container { min-height: auto !important; padding-top: 0.5rem !important; }