/* === Musicura Brand Tokens === */
:root {
  --primary: #0a6a7a;
  --primary-hover: #085a68;
  --primary-light: rgba(10, 106, 122, 0.08);
  --text: #0a0808;
  --text-secondary: #555;
  --bg: #ffffff;
  --bg-secondary: #f8f8f8;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d0d0d0;
  --gray-600: #666;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  background: var(--bg);
}

.logo {
  display: inline-block;
}

.logo img {
  height: 36px;
  width: auto;
}

/* === Main Container === */
main {
  flex: 1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* === Step Progress === */
.step-progress {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  position: relative;
}

.step-progress::before {
  content: '';
  position: absolute;
  top: 12px;
  left: calc(50% + 30px);
  right: calc(50% + 30px);
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  text-align: center;
  padding-top: 32px;
  min-width: 80px;
}

.step::before {
  content: attr(data-step);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step.active {
  color: var(--primary);
  font-weight: 600;
}

.step.active::before {
  background: var(--primary);
  color: white;
}

.step.done {
  color: var(--success);
}

.step.done::before {
  background: var(--success);
  color: white;
  content: '✓';
}

/* === Step Content === */
.step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* === Products Grid === */
.products {
  display: grid;
  gap: 12px;
}

.product-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg);
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.product-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light), var(--shadow-sm);
}

.product-card .product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.product-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.product-card .price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.product-card .desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.product-card .lead {
  font-size: 12px;
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.product-card .lead svg {
  width: 14px;
  height: 14px;
}

/* === Calendar === */
#calendar {
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.calendar-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.calendar-nav {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  transition: all 0.2s;
  font-family: var(--font);
}

.calendar-nav:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-grid .day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 8px 0 12px;
  letter-spacing: 0.5px;
}

.calendar-grid .day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--gray-100);
  transition: all 0.15s ease;
  position: relative;
}

.calendar-grid .day:hover:not(.disabled):not(.empty) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.calendar-grid .day.selected {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.calendar-grid .day.today {
  font-weight: 700;
}

.calendar-grid .day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.calendar-grid .day.selected.today::after {
  background: white;
}

.calendar-grid .day.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  background: transparent;
}

.calendar-grid .day.empty {
  background: transparent;
  cursor: default;
}

.calendar-grid .day.available {
  background: var(--success-bg);
}

.calendar-grid .day.available:hover {
  border-color: var(--success);
}

.calendar-grid .day.full {
  background: #fff3e0;
}

.calendar-grid .day.unavailable {
  background: var(--danger-bg);
}

.availability-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
  min-height: 24px;
}

/* === Forms === */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
  color: var(--gray-300);
}

/* === Order Summary === */
.order-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.order-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.order-summary .row.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
}

/* === Payment Section === */
.payment-section {
  margin-top: 28px;
}

.payment-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.payment-note {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 16px;
  font-style: italic;
}

.payment-wrapper {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  min-height: 200px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 13px 32px;
  border-radius: var(--radius);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 12px;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* === Error / Messages === */
.error-msg {
  color: var(--danger);
  background: var(--danger-bg);
  font-size: 14px;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-top: 8px;
  display: none;
}

/* === Confirmation === */
.confirmation {
  text-align: center;
  padding: 32px 0;
}

.check-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1;
}

.confirmation h1 {
  margin-bottom: 16px;
}

.confirmation p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.confirmation-details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 24px 0 32px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.confirmation .btn {
  display: inline-block;
  width: auto;
  padding: 13px 40px;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
}

/* === Loading State === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: var(--gray-600);
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === Responsive === */
@media (max-width: 640px) {
  main {
    padding: 32px 16px 48px;
  }

  .step-progress {
    gap: 16px;
  }

  .step {
    font-size: 11px;
    min-width: 60px;
    padding-top: 28px;
  }

  .step::before {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .step-progress::before {
    top: 10px;
  }

  h1 {
    font-size: 22px;
  }

  .product-card {
    padding: 16px 20px;
  }

  .product-card .price {
    font-size: 18px;
  }

  .order-summary {
    padding: 16px 20px;
  }

  #calendar {
    padding: 16px;
  }

  .calendar-grid .day {
    font-size: 12px;
  }

  .calendar-grid .day-name {
    font-size: 10px;
  }
}

@media (max-width: 400px) {
  .step {
    min-width: 50px;
    font-size: 10px;
  }

  .step-progress {
    gap: 8px;
  }

  .product-card .product-top {
    flex-direction: column;
    gap: 4px;
  }
}

/* === Submission Token === */
.submission-token {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.submission-token h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.submission-token p {
  font-size: 13px;
}

.token-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 16px;
}

.token-box code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}

/* === Success Message === */
.success-msg {
  color: var(--success);
  background: var(--success-bg);
  font-size: 14px;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-top: 8px;
}

/* === Checkbox === */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* === Invoice Fields === */
.invoice-fields {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

/* === Step 3 Back Buttons === */
.step-3-back {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}
