/* ============================================
   ApsteQ Booking Widget Styles
   Uses existing CSS variables from styles.css:
   --tech-blue, --deep-action, --graphite, --slate-custom, --pearl-gray, --sky-tint
   ============================================ */

.aq-booking {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--graphite, #1F2933);
  max-width: 100%;
}

.aq-booking__tz {
  font-size: 13px;
  color: var(--slate-custom, #4B5563);
  text-align: center;
  margin-bottom: 16px;
}

/* ── Section title ── */
.aq-booking__section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--graphite, #1F2933);
  margin-bottom: 16px;
}

/* ── Date Cards ── */
.aq-booking__date-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.aq-booking__date-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  text-align: left;
}
.aq-booking__date-card:hover {
  border-color: var(--tech-blue, #2776EA);
  background: var(--sky-tint, #E7F0FD);
}
.aq-booking__date-day {
  font-size: 15px;
  font-weight: 600;
  color: var(--graphite, #1F2933);
}
.aq-booking__date-md {
  font-size: 14px;
  color: var(--slate-custom, #4B5563);
}

/* ── Loading / Booking in progress ── */
.aq-booking__loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}
.aq-booking__spinner-large {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--tech-blue, #2776EA);
  border-radius: 50%;
  animation: aq-spin 0.7s linear infinite;
  margin-bottom: 16px;
}
.aq-booking__loading-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--slate-custom, #4B5563);
}

.aq-booking__cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.aq-booking__cal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--graphite, #1F2933);
}

.aq-booking__cal-nav {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--graphite, #1F2933);
  font-size: 18px;
  transition: background-color 0.2s;
}
.aq-booking__cal-nav:hover {
  background: var(--pearl-gray, #F9FAFB);
}
.aq-booking__cal-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.aq-booking__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 24px;
}

.aq-booking__cal-dow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-custom, #4B5563);
  text-align: center;
  padding: 8px 0;
}

.aq-booking__cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--graphite, #1F2933);
  transition: background-color 0.15s, color 0.15s;
}
.aq-booking__cal-day:hover:not(:disabled):not(.aq-booking__cal-day--selected) {
  background: var(--sky-tint, #E7F0FD);
}
.aq-booking__cal-day--selected {
  background: var(--tech-blue, #2776EA);
  color: #fff;
  font-weight: 700;
}
.aq-booking__cal-day:disabled {
  color: #d1d5db;
  cursor: not-allowed;
}
.aq-booking__cal-day--empty {
  cursor: default;
}
.aq-booking__cal-day--today:not(.aq-booking__cal-day--selected) {
  border: 2px solid var(--tech-blue, #2776EA);
}

.aq-booking__slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.aq-booking__slots-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--graphite, #1F2933);
}

.aq-booking__slots-back {
  font-size: 13px;
  color: var(--tech-blue, #2776EA);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.15s;
}
.aq-booking__slots-back:hover {
  background: var(--sky-tint, #E7F0FD);
}

.aq-booking__slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
@media (max-width: 480px) {
  .aq-booking__slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.aq-booking__slot {
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: var(--graphite, #1F2933);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.aq-booking__slot:hover {
  border-color: var(--tech-blue, #2776EA);
  background: var(--sky-tint, #E7F0FD);
}
.aq-booking__slot--selected {
  border-color: var(--tech-blue, #2776EA);
  background: var(--tech-blue, #2776EA);
  color: #fff;
}

.aq-booking__empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--slate-custom, #4B5563);
  font-size: 14px;
}

.aq-booking__confirm {
  padding: 4px 0;
}

.aq-booking__confirm-summary {
  background: var(--sky-tint, #E7F0FD);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--graphite, #1F2933);
  line-height: 1.6;
}
.aq-booking__confirm-summary strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.aq-booking__field {
  margin-bottom: 14px;
}
.aq-booking__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-custom, #4B5563);
  margin-bottom: 5px;
}
.aq-booking__field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--graphite, #1F2933);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.aq-booking__field input:focus {
  border-color: var(--tech-blue, #2776EA);
  box-shadow: 0 0 0 3px rgba(39,118,234,.15);
}

.aq-booking__submit {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--tech-blue, #2776EA);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 8px;
}
.aq-booking__submit:hover:not(:disabled) {
  background: var(--deep-action, #1A56DB);
}
.aq-booking__submit:active:not(:disabled) {
  transform: scale(0.98);
}
.aq-booking__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aq-booking__error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.aq-booking__skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
@media (max-width: 480px) {
  .aq-booking__skeleton {
    grid-template-columns: repeat(2, 1fr);
  }
}

.aq-booking__skeleton-item {
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: aq-shimmer 1.5s infinite;
}

@keyframes aq-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.aq-booking__spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aq-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ── Questions Step ── */
.aq-booking__question {
  margin-bottom: 20px;
}

.aq-booking__question-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--graphite, #1F2933);
  margin-bottom: 8px;
  line-height: 1.4;
}

.aq-booking__question-input,
.aq-booking__question-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--graphite, #1F2933);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
.aq-booking__question-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234B5563' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.aq-booking__question-input:focus,
.aq-booking__question-select:focus {
  border-color: var(--tech-blue, #2776EA);
  box-shadow: 0 0 0 3px rgba(39,118,234,.15);
}

.aq-booking__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aq-booking__option {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: var(--graphite, #1F2933);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
  text-align: left;
  line-height: 1.4;
}
.aq-booking__option:hover {
  border-color: var(--tech-blue, #2776EA);
  background: var(--sky-tint, #E7F0FD);
}
.aq-booking__option--selected {
  border-color: var(--tech-blue, #2776EA);
  background: var(--tech-blue, #2776EA);
  color: #fff;
}

/* ── Confirm Details (read-only summary) ── */
.aq-booking__confirm-details {
  background: var(--pearl-gray, #F9FAFB);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.aq-booking__confirm-detail {
  font-size: 14px;
  color: var(--graphite, #1F2933);
  line-height: 1.8;
}
.aq-booking__confirm-detail strong {
  color: var(--slate-custom, #4B5563);
  font-weight: 600;
  margin-right: 4px;
}
