/* ── Studio Booking Widget ─────────────────────────────────────── */
#sb-widget *,
#sb-widget *::before,
#sb-widget *::after {
  box-sizing: border-box;
}

#sb-widget {
  font-family:
    "Instrument Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 14px;
  color: #111;
  -webkit-font-smoothing: antialiased;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 0;

  /* Entry animation */
  animation: sb-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sb-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Layout ──────────────────────────────────────────────────────── */
.sb-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start; /* keep columns top-aligned */
}

/* Summary column stretches to full grid height so sticky works */
.sb-summary-col {
  align-self: stretch;
}

@media (max-width: 680px) {
  .sb-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  /* On mobile summary goes to bottom — natural DOM order (form first, summary second) */
  .sb-summary-col {
    order: 1;
    align-self: auto;
  }
}

/* ── Calendar ────────────────────────────────────────────────────── */
.sb-calendar {
  margin-bottom: 32px;
}

.sb-cal-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sb-cal-title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  color: #111;
  letter-spacing: -0.5px;
}
.sb-cal-title span {
  font-size: 22px;
  color: #666;
  margin-left: 4px;
}

.sb-cal-nav {
  display: flex;
  gap: 12px;
}

.sb-cal-nav button {
  background: none;
  border: none;
  padding: 0;
  font-family: "Instrument Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #666;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.15s;
}
.sb-cal-nav button:hover {
  color: #111;
}

.sb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.sb-cal-day-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #aaa;
  text-align: center;
  padding: 6px 0 10px;
  text-transform: uppercase;
}

.sb-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #111;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Geist Mono", monospace;
  transition: background 0.1s;
}
.sb-cal-day:hover:not(.is-blocked):not(.is-selected) {
  background: #f0f0f0;
  color: black !important;
}
.sb-cal-day.is-selected {
  background: #111;
  color: #fff;
  font-weight: 500;
}
.sb-cal-day.is-blocked {
  color: #ccc;
  cursor: default;
  pointer-events: none;
}
.sb-cal-day.is-empty {
  cursor: default;
}

/* ── Section label ───────────────────────────────────────────────── */
.sb-section {
  margin-bottom: 28px;
}
.sb-section-label {
  font-family: "Instrument Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #aaa;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── Duration picker ─────────────────────────────────────────────── */
.sb-durations {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-duration-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: #111;
  text-align: left;
  transition:
    border-color 0.12s,
    background 0.12s,
    color 0.12s;
}
.sb-duration-btn:hover:not(.is-selected) {
  border-color: #aaa;
  background: #fafafa;
  color: black !important;
}
.sb-duration-btn.is-selected {
  background: #111;
  color: #fff;
  border-color: #111;
}
.sb-duration-btn .sb-price {
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  opacity: 0.7;
}

/* ── Slot grid ───────────────────────────────────────────────────── */
.sb-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sb-slot-btn {
  min-width: 84px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: #111;
  text-align: center;
  transition:
    border-color 0.12s,
    background 0.12s,
    color 0.12s;
}
.sb-slot-btn:hover:not(.is-selected):not(.is-unavailable) {
  border-color: #aaa;
  background: #fafafa;
  color: black !important;
}
.sb-slot-btn.is-selected {
  background: #111;
  color: #fff;
  border-color: #111;
}
.sb-slot-btn.is-unavailable {
  color: #ccc;
  border-color: #eee;
  cursor: default;
  background: #fafafa;
}

/* ── Extras ──────────────────────────────────────────────────────── */
.sb-extras-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-extra-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  color: #111;
  text-align: left;
  transition:
    border-color 0.12s,
    background 0.12s,
    color 0.12s;
}
.sb-extra-btn:hover:not(.is-selected) {
  color: black !important;
  border-color: #aaa;
  background: #fafafa;
}
.sb-extra-btn.is-selected {
  background: #111;
  color: #fff;
  border-color: #111;
}
.sb-extra-btn .sb-extra-price {
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  opacity: 0.65;
}

/* ── Summary panel ───────────────────────────────────────────────── */
.sb-summary {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 28px 24px;
  position: sticky;
  top: 24px;
}

.sb-summary-title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
  color: #111;
  margin: 0 0 20px;
}

.sb-summary-rows {
  border-top: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

.sb-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
  font-size: 13px;
}
.sb-summary-row .sb-row-label {
  font-family: "Instrument Sans", sans-serif;
  color: #999;
  min-width: 54px;
  flex-shrink: 0;
}
.sb-summary-row .sb-row-value {
  font-family: "Geist Mono", monospace;
  color: #111;
  font-weight: 500;
  text-align: right;
}
.sb-summary-row .sb-row-value.is-empty {
  color: #ccc;
}

.sb-extras-summary {
  text-align: right;
}
.sb-extra-line {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  font-size: 13px;
}
.sb-extra-line-price {
  color: #999;
  font-weight: 400;
}

/* ── Customer form ───────────────────────────────────────────────── */
.sb-customer-form {
  display: none;
  margin-bottom: 16px;
}
.sb-customer-form.is-visible {
  display: block;
}
.sb-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.sb-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #111;
  outline: none;
  transition: border-color 0.15s;
}
.sb-input:focus {
  border-color: #111;
}
.sb-input::placeholder {
  color: #aaa;
}

/* ── Book button ─────────────────────────────────────────────────── */
.sb-book-btn {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: #111;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 12px;
}
.sb-book-btn:hover:not(:disabled) {
  background: #333;
}
.sb-book-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.sb-trust {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.5;
}

.sb-reset-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font-size: 11px;
  color: #bbb;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: color 0.2s;
  /* Prevent theme styles from injecting red or other colors */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.sb-reset-btn:hover,
.sb-reset-btn:focus {
  color: #888;
  background: none;
  text-decoration: underline;
  text-decoration-color: #ccc;
}

/* ── Error / loading ─────────────────────────────────────────────── */
.sb-error {
  font-size: 12px;
  color: #c0392b;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  margin-bottom: 10px;
}
.sb-loading {
  font-size: 13px;
  color: #aaa;
  padding: 8px 0;
}
.sb-no-slots {
  font-size: 13px;
  color: #aaa;
}

/* ── Spinner / loading (kept for book-btn state) ─────────────────── */
.sb-loading-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: #888;
  font-size: 13px;
}
.sb-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e0e0e0;
  border-top-color: #111;
  border-radius: 50%;
  animation: sb-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes sb-spin {
  to {
    transform: rotate(360deg);
  }
}

.sb-error-inline {
  font-size: 13px;
  color: #c0392b;
  padding: 8px 0;
}

/* ── Skeleton shimmer ────────────────────────────────────────────── */
@keyframes sb-shimmer {
  0% {
    background-position: -480px 0;
  }
  100% {
    background-position: 480px 0;
  }
}

.sb-skel-bar {
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 480px 100%;
  animation: sb-shimmer 1.4s ease-in-out infinite;
  border-radius: 3px;
}

/* Calendar skeleton */
.sb-skel-cal {
  user-select: none;
}

.sb-skel-cal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.sb-skel-cal-title {
  width: 160px;
  height: 28px;
}
.sb-skel-cal-nav {
  width: 100px;
  height: 14px;
}

.sb-skel-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.sb-skel-day-name {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 2px;
}
.sb-skel-day {
  aspect-ratio: 1;
  border-radius: 2px;
}

/* Extras skeleton */
.sb-extras-skel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sb-skel-extra-row {
  height: 50px;
  border-radius: 2px;
}

/* Duration skeleton */
.sb-dur-skel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sb-skel-dur-row {
  height: 50px;
  border-radius: 2px;
}

/* Slots skeleton */
.sb-slots-skel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sb-skel-slot {
  width: 84px;
  height: 52px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* summary empty placeholder */
.sb-sum-empty {
  color: #ccc !important;
  font-weight: 400 !important;
}

/* ── Summary total row ───────────────────────────────────────────── */
.sb-sum-total-row {
  border-top: 1px solid #e0e0e0 !important;
  margin-top: 2px;
}
.sb-total-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111 !important;
}
.sb-total-value {
  font-family: "Geist Mono", monospace;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #111 !important;
  letter-spacing: -0.3px;
}

/* ══════════════════════════════════════════════════════════════════
   BOOKING CONFIRMATION PAGE
   ══════════════════════════════════════════════════════════════════ */

.sb-confirm-page {
  font-family:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  box-sizing: border-box;
}

.sb-confirm-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  max-width: 500px;
  width: 100%;
  padding: 52px 44px 44px;
  text-align: center;
  box-sizing: border-box;
}

/* ── Icon ────────────────────────────────────────────────────────── */
.sb-confirm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
}
.sb-confirm-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Heading & subtitle ──────────────────────────────────────────── */
.sb-confirm-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
  color: #111;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.sb-confirm-sub {
  font-size: 14px;
  color: #666;
  line-height: 1.65;
  margin: 0 0 36px;
}
.sb-confirm-sub strong {
  color: #111;
  font-weight: 600;
}

/* ── Detail rows ─────────────────────────────────────────────────── */
.sb-confirm-details {
  text-align: left;
  border-top: 1px solid #f0f0f0;
  margin-bottom: 36px;
}

.sb-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 16px;
}

.sb-confirm-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  flex-shrink: 0;
}

.sb-confirm-value {
  font-size: 14px;
  color: #111;
  font-weight: 500;
  text-align: right;
}

/* ── Total row ───────────────────────────────────────────────────── */
.sb-confirm-total {
  border-bottom: none;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 2px solid #111;
}
.sb-confirm-total .sb-confirm-label {
  color: #111;
}
.sb-confirm-total .sb-confirm-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

/* ── Button ──────────────────────────────────────────────────────── */
.sb-confirm-btn {
  display: inline-block;
  width: 100%;
  padding: 14px 20px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  box-sizing: border-box;
}
.sb-confirm-btn:hover {
  background: #333;
  color: #fff;
  text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .sb-confirm-page {
    padding: 24px 16px;
    align-items: flex-start;
  }
  .sb-confirm-card {
    padding: 36px 24px 32px;
  }
  .sb-confirm-title {
    font-size: 22px;
  }
  .sb-confirm-total .sb-confirm-value {
    font-size: 18px;
  }
}

button#sb-cal-prev:hover {
  background: white !important;
}

button#sb-cal-next:hover {
  background: white !important;
}
