/* ===============================
   Variables
================================= */
:root {
  --color-white: #ffffff;
  --color-black: #000000;

  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-primary-light: #eff6ff;

  --color-text-main: #1a1a1a;
  --color-text-heading: #0f172a;
  --color-text-body: #334155;
  --color-text-muted: #64748b;
  --color-text-soft: #94a3b8;
  --color-text-label: #475569;

  --color-bg-soft: #f8fafc;
  --color-bg-subtle: #f1f5f9;

  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  --color-danger: #dc2626;

  --shadow-main: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-card-selected: 0 4px 12px rgba(59, 130, 246, 0.15);
  --shadow-button: 0 4px 15px rgba(37, 99, 235, 0.3);
  --shadow-button-hover: 0 8px 20px rgba(37, 99, 235, 0.4);
  --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.1);

  --font-main: "Poppins", sans-serif;
}

/* Modern Reset */
.shala-booking-wrapper {
  background: var(--color-white);
  border-radius: 16px;
  font-family: var(--font-main);
  color: var(--color-text-main);
  box-sizing: border-box !important;
}

.shala-section label.shala-card-option {
  width: 100%;
}

.shala-booking-wrapper * {
  box-sizing: border-box;
}

/* Header */
.shala-header {
  text-align: center;
  margin-bottom: 30px;
}

.shala-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-heading);
  margin: 0 0 10px;
}

.shala-header p {
  font-size: 16px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Sections */
.shala-section {
  margin-bottom: 30px;
}

.shala-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text-body);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shala-optional {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-soft);
  background: var(--color-bg-subtle);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Card Options (Tour Types) */
.shala-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.shala-card-option {
  position: relative;
  cursor: pointer;
  display: block;
}

.shala-card-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.shala-card-content {
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  height: 100%;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.shala-card-option input:checked + .shala-card-content {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: var(--shadow-card-selected);
}

.shala-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.shala-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.shala-card-price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* Passenger Inputs (Counter Style) */
.shala-passenger-inputs {
  display: flex;
  gap: 20px;
}

.shala-input-group {
  flex: 1;
  background: var(--color-bg-soft);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shala-input-group label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text-label);
}

.shala-sub-label {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-soft);
}

/* Date & Time Inputs */
.shala-datetime-inputs {
  display: flex;
  gap: 20px;
}

.shala-datetime-inputs .shala-input-group {
  flex: 1;
}

.shala-date-input-wrap {
  width: 100%;
}

.shala-date-input-wrap .shala-date-picker,
.shala-date-input-wrap input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  font-size: 15px;
  color: var(--color-text-heading);
  background: var(--color-white);
}

.shala-datetime-inputs input[type="date"],
.shala-datetime-inputs select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  font-size: 15px;
  color: var(--color-text-heading);
  background: var(--color-white);
  transition: all 0.2s;
}

.shala-datetime-inputs input[type="date"]:focus,
.shala-datetime-inputs input[type="text"]:focus,
.shala-datetime-inputs select:focus,
.shala-date-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

.shala-datetime-inputs input[type="text"].flatpickr-input,
.shala-datetime-inputs input[type="text"][readonly] {
  background: var(--color-white);
  cursor: pointer;
}

.shala-datetime-inputs select:disabled {
  background: var(--color-bg-subtle);
  color: var(--color-text-soft);
  cursor: not-allowed;
}

.shala-qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shala-qty-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 1px solid var(--color-border-strong) !important;
  background: var(--color-white) !important;
  color: var(--color-text-body) !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.shala-qty-btn:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-text-soft);
}

input[type="number"].shala-qty-input,
.shala-qty-control input {
  width: 50px !important;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  border: none !important;
  background: transparent;
  color: var(--color-text-heading);
  -moz-appearance: textfield;
}

.shala-input-group label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shala-options-list label.shala-radio-row {
  width: 100%;
}

.shala-qty-control input::-webkit-outer-spin-button,
.shala-qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Private Options (List) */
.shala-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shala-radio-row {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.shala-radio-row:hover {
  background: var(--color-bg-soft);
}

.shala-radio-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.shala-radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-strong);
  border-radius: 50%;
  margin-right: 15px;
  position: relative;
  flex-shrink: 0;
}

.shala-radio-row input:checked ~ .shala-radio-custom {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.shala-radio-row input:checked ~ .shala-radio-custom::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  background: var(--color-white);
  border-radius: 50%;
}

.shala-radio-row:has(input:checked),
.shala-radio-row.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.shala-radio-row .row-content {
  flex: 1;
}

.shala-radio-row .text {
  display: block;
  font-weight: 500;
  color: var(--color-text-body);
}

.shala-radio-row .limit {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.shala-radio-row .price-tag {
  font-weight: 700;
  color: var(--color-text-heading);
}

/* Timeline/Schedule */
.shala-timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--color-border);
  margin-left: 10px;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding-left: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-strong);
  border: 2px solid var(--color-white);
}

.timeline-item .time {
  font-weight: 700;
  color: var(--color-primary);
  margin-right: 8px;
}

.timeline-item .event {
  color: var(--color-text-label);
}

/* Footer */
.shala-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shala-price-display {
  display: flex;
  flex-direction: column;
}

.shala-price-display .label {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.shala-price-display .amount {
  font-size: 32px;
  font-weight: 800;
  color: #1e4488;
  line-height: 1;
}

.shala-book-btn {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  ) !important;
  color: var(--color-white) !important;
  border: none !important;
  padding: 16px 32px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: var(--shadow-button) !important;
  transition: all 0.3s !important;
}

.shala-book-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
}

.shala-book-btn:disabled {
  background: var(--color-border-strong);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.shala-book-btn.shala-btn-validation-error {
  animation: shala-shake 0.4s ease;
}

@keyframes shala-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

.shala-validation-error {
  display: block;
  font-size: 13px;
  color: var(--color-danger);
  margin-top: 6px;
}

.shala-input-group.shala-has-error input,
.shala-input-group.shala-has-error select {
  border-color: var(--color-danger);
}

.shala-tour-types.shala-has-error .shala-options-grid {
  outline: 2px solid var(--color-danger);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .shala-options-grid {
    grid-template-columns: 1fr;
  }

  .shala-passenger-inputs {
    flex-direction: column;
  }

  .shala-footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .shala-book-btn {
    width: 100%;
  }
}
