/* SupportX appointment booking + live date/time - v1.9.8 */
.xc-header-one-top__right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.xc-live-datetime,
.xc-live-datetime span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 700;
  line-height: 1.3;
}

.xc-live-datetime__value {
  white-space: nowrap;
}

.xc-appointment-open {
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #07124a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(8, 18, 74, 0.16);
  transition: all 0.25s ease;
}

.xc-appointment-open:hover,
.xc-appointment-open:focus {
  transform: translateY(-1px);
  color: #ffffff;
  background: linear-gradient(90deg, #123f91 0%, #b8177c 100%);
}

.xc-appointment-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #123f91 0%, #b8177c 100%);
  color: #ffffff;
}

.xc-appointment-mobile-bar .xc-live-datetime__value {
  white-space: normal;
  font-size: 13px;
}

.xc-appointment-mobile-bar .xc-appointment-open {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
  flex: 0 0 auto;
}

.xc-appointment-panel {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 18, 74, 0.56);
  backdrop-filter: blur(8px);
}

.xc-appointment-panel.is-open {
  display: flex;
}

.xc-appointment-card {
  width: min(100%, 440px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(7, 18, 74, 0.28);
  padding: 24px;
  color: #101a4d;
}

.xc-appointment-card {
  position: relative;
}

.xc-appointment-card.is-booking {
  overflow: hidden;
}

.xc-appointment-feedback {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  text-align: center;
}

.xc-appointment-feedback.is-visible {
  display: flex;
}

.xc-appointment-feedback__box {
  width: min(100%, 330px);
  border: 1px solid #edf0f8;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(7, 18, 74, 0.16);
  padding: 28px 22px;
}

.xc-appointment-spinner {
  display: none;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border: 5px solid #edf0f8;
  border-top-color: #b8177c;
  border-radius: 50%;
  animation: xcAppointmentSpin 0.85s linear infinite;
}

.xc-appointment-feedback__icon {
  display: none;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #123f91 0%, #b8177c 100%);
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  line-height: 58px;
}

.xc-appointment-feedback h4 {
  margin: 0 0 8px;
  color: #07124a;
  font-size: 22px;
  line-height: 1.2;
}

.xc-appointment-feedback p {
  margin: 0;
  color: #505a80;
  font-size: 14px;
  line-height: 1.55;
}

.xc-appointment-feedback__button {
  display: none;
  border: 0;
  border-radius: 999px;
  margin: 18px auto 0;
  padding: 11px 24px;
  background: linear-gradient(90deg, #123f91 0%, #b8177c 100%);
  color: #ffffff;
  font-weight: 900;
}

.xc-appointment-feedback.is-loading .xc-appointment-spinner,
.xc-appointment-feedback.is-success .xc-appointment-feedback__icon {
  display: block;
}

.xc-appointment-feedback.is-success .xc-appointment-feedback__button,
.xc-appointment-feedback.is-error .xc-appointment-feedback__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.xc-appointment-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.xc-appointment-card__eyebrow {
  margin: 0 0 5px;
  color: #b8177c;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.xc-appointment-card__title {
  margin: 0;
  color: #07124a;
  font-size: 26px;
  line-height: 1.15;
}

.xc-appointment-close {
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f4fb;
  color: #07124a;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}

.xc-appointment-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.xc-appointment-month__title {
  font-weight: 900;
  color: #07124a;
}

.xc-appointment-month__nav {
  width: 34px;
  height: 34px;
  border: 1px solid #e1e5f3;
  border-radius: 50%;
  background: #fff;
  color: #07124a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.xc-appointment-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.xc-appointment-weekday {
  color: #70799b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.xc-appointment-day {
  border: 1px solid #edf0f8;
  border-radius: 13px;
  background: #f8f9fd;
  color: #101a4d;
  min-height: 48px;
  padding: 6px 4px;
  font-weight: 800;
  transition: all 0.2s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.xc-appointment-day__number {
  display: block;
  line-height: 1;
}

.xc-appointment-day__badge {
  display: block;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  color: #b8177c;
  white-space: nowrap;
}

.xc-appointment-day:not(:disabled):hover,
.xc-appointment-day.is-selected {
  background: linear-gradient(135deg, #123f91 0%, #b8177c 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
}

.xc-appointment-day.is-today {
  border-color: #b8177c;
  color: #b8177c;
}

.xc-appointment-day.is-partially-booked {
  border-color: rgba(184, 23, 124, 0.35);
  background: #fff5fb;
  color: #07124a;
}

.xc-appointment-day.is-partially-booked:not(:disabled):hover .xc-appointment-day__badge,
.xc-appointment-day.is-selected .xc-appointment-day__badge {
  color: #ffffff;
}

.xc-appointment-day.is-booked,
.xc-appointment-day:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  color: #8d93aa;
  background: #eef1f8;
}

.xc-appointment-day.is-booked .xc-appointment-day__badge {
  color: #b8177c;
}

.xc-appointment-form {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #edf0f8;
}

.xc-appointment-form.is-visible {
  display: block;
}

.xc-appointment-selected {
  margin: 0 0 12px;
  font-weight: 800;
  color: #07124a;
}

.xc-appointment-time-wrap {
  display: none;
  margin: 0 0 14px;
}

.xc-appointment-time-wrap.is-visible {
  display: block;
}

.xc-appointment-time-label span {
  color: #70799b;
  font-size: 12px;
  font-weight: 700;
}

.xc-appointment-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.xc-appointment-time {
  border: 1px solid #e0e5f2;
  border-radius: 12px;
  min-height: 44px;
  padding: 8px 10px;
  background: #ffffff;
  color: #07124a;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.xc-appointment-time span {
  display: block;
  color: #b8177c;
  font-size: 10px;
  line-height: 1;
  margin-top: 2px;
}

.xc-appointment-time:not(:disabled):hover,
.xc-appointment-time.is-selected {
  background: linear-gradient(135deg, #123f91 0%, #b8177c 100%);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
}

.xc-appointment-time.is-booked,
.xc-appointment-time:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  color: #8d93aa;
  background: #eef1f8;
}

.xc-appointment-form label {
  display: block;
  margin-bottom: 6px;
  color: #07124a;
  font-size: 13px;
  font-weight: 800;
}

.xc-appointment-form input {
  width: 100%;
  border: 1px solid #e0e5f2;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  color: #07124a;
  background: #ffffff;
}

.xc-appointment-submit {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #123f91 0%, #b8177c 100%);
  color: #ffffff;
  font-weight: 900;
}

.xc-appointment-submit:disabled {
  cursor: progress;
  opacity: 0.72;
}

.xc-appointment-help,
.xc-appointment-status {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #505a80;
}

.xc-appointment-status.is-error {
  color: #b81736;
  font-weight: 800;
}

.xc-appointment-status.is-success {
  color: #0b7a42;
  font-weight: 800;
}

[data-supportx-theme="dark"] .xc-appointment-card {
  background: #101735;
  color: #eef2ff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

[data-supportx-theme="dark"] .xc-appointment-feedback {
  background: rgba(16, 23, 53, 0.92);
}

[data-supportx-theme="dark"] .xc-appointment-feedback__box {
  background: #172044;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 18px 54px rgba(0,0,0,0.36);
}

[data-supportx-theme="dark"] .xc-appointment-feedback h4 {
  color: #ffffff;
}

[data-supportx-theme="dark"] .xc-appointment-feedback p {
  color: #c7cdec;
}

[data-supportx-theme="dark"] .xc-appointment-spinner {
  border-color: rgba(255,255,255,0.16);
  border-top-color: #ff8ac8;
}

[data-supportx-theme="dark"] .xc-appointment-card__title,
[data-supportx-theme="dark"] .xc-appointment-month__title,
[data-supportx-theme="dark"] .xc-appointment-selected,
[data-supportx-theme="dark"] .xc-appointment-form label {
  color: #ffffff;
}

[data-supportx-theme="dark"] .xc-appointment-close,
[data-supportx-theme="dark"] .xc-appointment-month__nav,
[data-supportx-theme="dark"] .xc-appointment-day,
[data-supportx-theme="dark"] .xc-appointment-time,
[data-supportx-theme="dark"] .xc-appointment-form input {
  background: #172044;
  border-color: rgba(255,255,255,0.12);
  color: #ffffff;
}


[data-supportx-theme="dark"] .xc-appointment-day.is-partially-booked {
  background: rgba(184, 23, 124, 0.18);
  border-color: rgba(184, 23, 124, 0.42);
  color: #ffffff;
}

[data-supportx-theme="dark"] .xc-appointment-day__badge {
  color: #ff8ac8;
}

[data-supportx-theme="dark"] .xc-appointment-time-label span,
[data-supportx-theme="dark"] .xc-appointment-help,
[data-supportx-theme="dark"] .xc-appointment-status {
  color: #c7cdec;
}

@media (max-width: 991px) {
  .xc-appointment-mobile-bar {
    display: flex;
  }
  .xc-appointment-card {
    padding: 20px;
    border-radius: 22px;
  }
  .xc-appointment-card__title {
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .xc-appointment-mobile-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .xc-appointment-calendar {
    gap: 6px;
  }
  .xc-appointment-day {
    min-height: 40px;
    border-radius: 10px;
    font-size: 13px;
  }
  .xc-appointment-times {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) {
  .xc-appointment-panel.is-open.is-dropdown {
    display: block;
    inset: auto;
    top: var(--supportx-appointment-top, 78px);
    right: var(--supportx-appointment-right, 24px);
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
  }
  .xc-appointment-panel.is-open.is-dropdown .xc-appointment-card {
    pointer-events: auto;
    width: 440px;
  }
}
