/**
 * Celebration Station Delivery & Pick-Up - Checkout Stylesheet
 */

:root {
  --cs-purple: #662d92;
  --cs-purple-dark: #4d1e70;
  --cs-purple-light: #f7f1fc;
  --cs-purple-border: #d8b4fe;
  --cs-coral: #ff2a13;
  --cs-text-main: #1e293b;
  --cs-text-muted: #64748b;
  --cs-border: #e2e8f0;
  --cs-radius: 12px;
}

/* ==========================================================================
   Checkout Delivery Schedule Container
   ========================================================================== */
.cs-delivery-schedule-box {
  margin: 1.75rem 0 2rem 0;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--cs-purple-border);
  border-radius: var(--cs-radius);
  box-shadow: 0 4px 16px rgba(102, 45, 146, 0.06);
  position: relative;
  box-sizing: border-box;
  font-family: inherit;
}

.cs-schedule-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1e6fb;
  padding-bottom: 0.85rem;
}

.cs-schedule-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cs-schedule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--cs-purple-light);
  color: var(--cs-purple);
  border-radius: 10px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cs-schedule-title {
  margin: 0 !important;
  font-size: 1.18rem !important;
  font-weight: 700 !important;
  color: var(--cs-purple) !important;
  line-height: 1.3 !important;
}

.cs-schedule-subtitle {
  margin: 0.25rem 0 0 0 !important;
  font-size: 0.86rem !important;
  color: var(--cs-text-muted) !important;
  line-height: 1.4 !important;
}

/* ==========================================================================
   Active Method Dynamic Banner
   ========================================================================== */
.cs-method-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.cs-method-banner.cs-banner-pickup {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.cs-method-banner.cs-banner-courier {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.cs-method-banner.cs-banner-corporate {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}

.cs-banner-icon-col i {
  font-size: 1.35rem;
}

.cs-banner-text-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cs-banner-note {
  font-size: 0.82rem;
  opacity: 0.9;
}

/* ==========================================================================
   Form Fields Grid
   ========================================================================== */
.cs-schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .cs-schedule-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.cs-form-group {
  position: relative;
  margin-bottom: 0.75rem;
}

.cs-group-notes {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.cs-field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cs-text-main);
  margin-bottom: 0.45rem;
}

.cs-field-label i {
  color: var(--cs-purple);
  font-size: 0.95rem;
}

.cs-field-label .required {
  color: var(--cs-coral);
  font-weight: 800;
  text-decoration: none;
}

.cs-field-hint {
  margin: 0.35rem 0 0 0;
  font-size: 0.78rem;
  color: var(--cs-text-muted);
  line-height: 1.35;
}

.cs-field-hint.cs-hint-highlight {
  color: var(--cs-purple);
  font-weight: 600;
}

/* Input with calendar trigger */
.cs-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.cs-input-with-icon input.cs-date-input {
  width: 100% !important;
  padding: 0.75rem 2.8rem 0.75rem 0.95rem !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 0.94rem !important;
  font-weight: 500 !important;
  color: var(--cs-text-main) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-input-with-icon input.cs-date-input:focus {
  border-color: var(--cs-purple) !important;
  box-shadow: 0 0 0 3px rgba(102, 45, 146, 0.15) !important;
  outline: none !important;
}

.cs-calendar-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--cs-purple);
  font-size: 1.15rem;
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.cs-calendar-btn:hover {
  background: var(--cs-purple-light);
}

/* Select wrapper */
.cs-select-wrapper select.cs-time-select {
  width: 100% !important;
  padding: 0.75rem 1rem !important;
  background-color: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 0.94rem !important;
  font-weight: 500 !important;
  color: var(--cs-text-main) !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.cs-select-wrapper select.cs-time-select:focus {
  border-color: var(--cs-purple) !important;
  box-shadow: 0 0 0 3px rgba(102, 45, 146, 0.15) !important;
  outline: none !important;
}

.cs-group-notes textarea {
  width: 100% !important;
  padding: 0.65rem 0.85rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  resize: vertical;
}

.cs-group-notes textarea:focus {
  border-color: var(--cs-purple) !important;
  box-shadow: 0 0 0 3px rgba(102, 45, 146, 0.15) !important;
  outline: none !important;
}

/* ==========================================================================
   Interactive Calendar Popup
   ========================================================================== */
.cs-calendar-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 310px;
  background: #ffffff;
  border: 1px solid var(--cs-purple-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(77, 30, 112, 0.18);
  padding: 1rem;
  z-index: 99999;
  box-sizing: border-box;
}

@media (max-width: 420px) {
  .cs-calendar-popup {
    width: 290px;
    padding: 0.75rem;
  }
}

.cs-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cs-cal-month-year {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cs-purple);
}

.cs-cal-nav {
  background: #f1e6fb;
  border: none;
  color: var(--cs-purple);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-cal-nav:hover {
  background: var(--cs-purple);
  color: #ffffff;
}

.cs-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cs-text-muted);
  margin-bottom: 0.4rem;
}

.cs-cal-weekdays span {
  padding: 0.25rem 0;
}

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

.cs-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--cs-text-main);
  transition: all 0.12s ease;
  padding: 0;
  margin: 0;
}

.cs-cal-day:hover:not(.is-disabled) {
  background: var(--cs-purple-light);
  color: var(--cs-purple);
  font-weight: 700;
}

.cs-cal-day.is-selected {
  background: var(--cs-purple) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(102, 45, 146, 0.4);
}

.cs-cal-day.is-today {
  border: 1.5px solid var(--cs-purple);
}

.cs-cal-day.is-disabled {
  color: #cbd5e1 !important;
  cursor: not-allowed !important;
  text-decoration: line-through;
  opacity: 0.55;
  background: transparent;
}

.cs-cal-day.is-holiday {
  background: #ffe4e6 !important;
  color: #e11d48 !important;
  cursor: not-allowed !important;
  text-decoration: line-through;
  opacity: 0.85 !important;
  font-weight: 600;
  position: relative;
}

.cs-cal-holiday-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  background-color: #e11d48;
  border-radius: 50%;
}

.cs-cal-day.is-empty {
  cursor: default;
  background: transparent;
}

.cs-cal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: var(--cs-text-muted);
  flex-wrap: wrap;
}

.cs-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cs-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.cs-dot-avail {
  background: var(--cs-purple);
}

.cs-dot-holiday {
  background: #e11d48;
}

.cs-dot-disabled {
  background: #cbd5e1;
}

/* ==========================================================================
   Shipping Rates List Hints
   ========================================================================== */
.cs-rate-hint {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.25rem;
  margin-left: 1.85rem;
  line-height: 1.3;
}

.cs-hint-pickup {
  color: #166534;
}

.cs-hint-courier {
  color: #b45309;
}

.cs-hint-corporate {
  color: #6b21a8;
}

/* ==========================================================================
   Customer Order Details Page / Thank You Card
   ========================================================================== */
.cs-order-details-schedule-card {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #fbf8fd;
  border: 1.5px solid #e2d2f1;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(102, 45, 146, 0.05);
}

.cs-order-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #ebd9f7;
  padding-bottom: 0.85rem;
}

.cs-order-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cs-purple);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.cs-order-card-title {
  margin: 0 !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: var(--cs-purple) !important;
}

.cs-order-card-subtitle {
  margin: 0.2rem 0 0 0 !important;
  font-size: 0.85rem !important;
  color: var(--cs-text-muted) !important;
}

.cs-order-schedule-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.cs-info-cell {
  background: #ffffff;
  border: 1px solid #ecdcf7;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.cs-info-cell.cs-cell-full {
  grid-column: 1 / -1;
}

.cs-cell-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cs-text-muted);
  margin-bottom: 0.25rem;
}

.cs-cell-val {
  display: block;
  font-size: 0.98rem;
  color: var(--cs-text-main);
}

.cs-method-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: var(--cs-purple-light);
  color: var(--cs-purple);
  font-size: 0.84rem;
  font-weight: 700;
}

.cs-date-highlight {
  color: var(--cs-purple);
  font-weight: 700;
}

.cs-notes-text {
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.4;
  color: #334155;
}

/* ==========================================================================
   Real-Time Slot Status & Booked Slot Styles
   ========================================================================== */
.cs-slot-booked {
  color: #94a3b8 !important;
  font-style: italic;
  background-color: #f8fafc;
}

.cs-hint-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #dc2626;
  font-weight: 600;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.cs-hint-success {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #16a34a;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.cs-loading-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cs-purple);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}
