@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Inter:wght@100..900&display=swap');

:root {
  --warm-bg: #fdfcf9;
  --olive: #5A5A40;
  --olive-light: #7A7A5A;
  --olive-dark: #3E3E2C;
  --warm-white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--warm-bg);
  font-family: "Inter", sans-serif;
  color: #292524;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.serif {
  font-family: "Cormorant Garamond", serif;
}

/* Form elements */
input[type="text"],
input[type="tel"],
select,
textarea {
  background: white;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  outline: none;
  transition: all 0.2s;
  color: #292524;
  font-size: 1rem;
  width: 100%;
  font-family: "Inter", sans-serif;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder {
  color: #a8a29e;
}

input[type="text"]:focus,
input[type="tel"]:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(90, 90, 64, 0.1);
}

.card-shadow {
  box-shadow: 0 4px 20px -2px rgba(90, 90, 64, 0.05), 0 2px 8px -2px rgba(90, 90, 64, 0.03);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(-10%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pop-in {
  animation: popIn 0.3s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Counter component */
.counter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.counter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #a8a29e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.counter-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafaf9;
  border-radius: 1rem;
  padding: 0.5rem;
  border: 1px solid #f5f5f4;
}

.counter-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: white;
  border: 1px solid #f5f5f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  color: #57534e;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.counter-btn:hover {
  background: #f5f5f4;
}

.counter-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #1c1917;
  width: 2rem;
  text-align: center;
}

/* Tea option buttons */
.tea-option {
  padding: 1rem;
  border-radius: 1rem;
  font-weight: 700;
  transition: all 0.2s;
  border: 2px solid #f5f5f4;
  background: white;
  color: #57534e;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
}

.tea-option:hover {
  border-color: #e7e5e4;
}

.tea-option.active {
  background: var(--olive);
  color: white;
  border-color: var(--olive);
  box-shadow: 0 10px 15px -3px rgba(90, 90, 64, 0.2);
}

/* Tea flask +/- */
.flask-btn {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  border: 2px solid #f5f5f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  color: #1c1917;
}

.flask-btn:hover {
  border-color: var(--olive);
  color: var(--olive);
}

/* Checkbox */
.custom-checkbox {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.75rem;
  cursor: pointer;
  accent-color: var(--olive);
}

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  background: var(--olive);
  color: white;
  box-shadow: 0 25px 50px -12px rgba(90, 90, 64, 0.3);
}

.submit-btn:hover {
  background: var(--olive-dark);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  background: #f5f5f4;
  color: #a8a29e;
  cursor: not-allowed;
  box-shadow: none;
}

/* Step indicators */
.step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.5s;
}

.step-dot.active {
  background: var(--olive);
  color: white;
}

.step-dot.inactive {
  background: #e7e5e4;
  color: #a8a29e;
}

.step-line {
  width: 3rem;
  height: 1px;
  background: #e7e5e4;
  margin: 0 0.5rem;
}

@media (min-width: 640px) {
  .step-line {
    width: 6rem;
  }
}

/* Admin dashboard */
.admin-stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid #f5f5f4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.admin-stat-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.admin-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1917;
}

.admin-stat-label {
  font-size: 10px;
  color: #a8a29e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Table */
.reg-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

.reg-table thead tr {
  background: rgba(250, 250, 249, 0.5);
  border-bottom: 1px solid #f5f5f4;
}

.reg-table th {
  padding: 1.25rem 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a8a29e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.reg-table tbody tr {
  border-bottom: 1px solid #fafaf9;
  transition: background 0.15s;
}

.reg-table tbody tr:hover {
  background: rgba(250, 250, 249, 0.5);
}

.reg-table td {
  padding: 1.25rem 2rem;
}

.total-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(90, 90, 64, 0.1);
  color: var(--olive);
  font-weight: 700;
  font-size: 0.875rem;
}

.flask-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
}

.flask-badge.has-flasks {
  background: #fffbeb;
  color: #d97706;
}

.flask-badge.no-flasks {
  background: #f5f5f4;
  color: #a8a29e;
}

.new-badge {
  background: #10b981;
  color: white;
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 9999px;
  text-transform: uppercase;
  font-weight: 900;
  animation: bounce 1s infinite;
  display: inline-block;
  margin-left: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .md-grid-2 { grid-template-columns: 1fr !important; }
  .md-grid-3 { grid-template-columns: 1fr !important; }
  .admin-header-flex { flex-direction: column; align-items: flex-start; }
  .admin-actions { flex-wrap: wrap; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Event details: stack vertically */
  #event-details-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Section cards: reduce padding & border-radius */
  .section-card {
    padding: 1.5rem;
    border-radius: 1.5rem;
  }

  /* Children counter grid: 2 columns */
  .children-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Step indicators: compact */
  .step-line {
    width: 2rem;
  }

  /* Success card */
  .success-card {
    padding: 1.75rem;
    border-radius: 2rem;
  }

  /* Admin table: tighter cells */
  .reg-table th,
  .reg-table td {
    padding: 0.75rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Footer: stack items */
  .footer-inner {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  /* Headcount value */
  .headcount-value {
    font-size: 2.5rem;
  }

  .flask-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  /* Extra-small screens */
  .section-card {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  /* Children counter grid: stack */
  .children-grid {
    grid-template-columns: 1fr !important;
  }

  /* Admin stats: single column */
  .admin-stats-grid {
    grid-template-columns: 1fr !important;
  }

  /* Step indicators: tighter */
  .step-line {
    width: 1.25rem;
    margin: 0 0.25rem;
  }

  .step-dot {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
  }

  /* Confirm text */
  .confirm-text {
    font-size: 0.95rem;
  }

  /* Submit button */
  .submit-btn {
    padding: 1.25rem;
    font-size: 1.05rem;
  }

  /* Counter controls */
  .counter-btn {
    width: 2.25rem;
    height: 2.25rem;
  }

  /* Flask counter */
  .flask-btn {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
}

/* Admin buttons */
.admin-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
}

/* SVG Icons inline */
.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-xl {
  width: 2.5rem;
  height: 2.5rem;
}

.icon-hero {
  width: 3rem;
  height: 3rem;
}

/* Hidden utility */
.hidden { display: none !important; }

/* Section cards */
.section-card {
  background: white;
  border-radius: 2.5rem;
  padding: 2.5rem;
  border: 1px solid #f5f5f4;
}

/* Icon box in header */
.icon-box {
  width: 5rem;
  height: 5rem;
  background: var(--olive);
  border-radius: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  box-shadow: 0 25px 50px -12px rgba(90, 90, 64, 0.3);
  cursor: default;
  transition: transform 0.3s;
}

.icon-box:hover {
  transform: rotate(15deg) scale(1.1);
}

/* Section icon */
.section-icon {
  width: 3rem;
  height: 3rem;
  background: #fafaf9;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Error box */
.error-box {
  padding: 1.25rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid #fecaca;
}

/* Success page */
.success-card {
  background: white;
  border-radius: 3rem;
  padding: 3rem;
  max-width: 32rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border: 1px solid #f5f5f4;
}

.success-icon-wrap {
  width: 6rem;
  height: 6rem;
  background: #ecfdf5;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.success-details {
  text-align: left;
  background: #fafaf9;
  padding: 2rem;
  border-radius: 2rem;
  border: 1px solid #f5f5f4;
  margin-bottom: 2.5rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #44403c;
  padding: 0.25rem 0;
}

.detail-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.calendar-btn {
  width: 100%;
  background: white;
  border: 2px solid #f5f5f4;
  color: #44403c;
  font-weight: 700;
  padding: 1rem;
  border-radius: 9999px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.calendar-btn:hover {
  border-color: var(--olive);
}

.register-another-btn {
  width: 100%;
  background: #1c1917;
  color: white;
  font-weight: 700;
  padding: 1.25rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: "Inter", sans-serif;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.register-another-btn:hover {
  background: black;
}

/* Footer */
.footer-link {
  color: #a8a29e;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--olive);
}

.dashboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  background: #f5f5f4;
  color: #a8a29e;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  font-family: "Inter", sans-serif;
}

.dashboard-btn:hover {
  color: #57534e;
  background: #e7e5e4;
  transform: scale(1.05);
}

.dashboard-btn:active {
  transform: scale(0.95);
}

/* Tea flasks section */
.tea-info-box {
  padding: 1.25rem;
  background: rgba(255, 251, 235, 0.5);
  border-radius: 1.5rem;
  border: 1px solid rgba(254, 243, 199, 0.5);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.tea-info-text {
  font-size: 0.875rem;
  color: rgba(146, 64, 14, 0.8);
  line-height: 1.6;
  font-weight: 500;
}

.flask-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.flask-value {
  text-align: center;
}

.flask-number {
  font-size: 3.75rem;
  font-weight: 900;
  color: #1c1917;
}

.flask-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #a8a29e;
  margin-top: 0.5rem;
}

/* Total headcount */
.headcount-box {
  background: rgba(250, 250, 249, 0.8);
  padding: 2rem;
  border-radius: 2rem;
  border: 1px solid #f5f5f4;
  text-align: center;
}

.headcount-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 900;
  color: #a8a29e;
  margin-bottom: 0.5rem;
}

.headcount-value {
  font-size: 3.75rem;
  font-weight: 900;
  color: var(--olive);
}

.headcount-sub {
  font-size: 0.875rem;
  color: #78716c;
  margin-top: 0.5rem;
  font-weight: 500;
}

.info-box {
  background: rgba(250, 250, 249, 0.5);
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid #f5f5f4;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.info-text {
  font-size: 0.875rem;
  color: #78716c;
  line-height: 1.6;
  font-weight: 500;
}

/* Confirm section */
.confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  cursor: pointer;
  padding: 1.5rem;
  border-radius: 1.5rem;
  transition: background 0.15s;
}

.confirm-label:hover {
  background: #fafaf9;
}

.confirm-text {
  font-size: 1.125rem;
  color: #57534e;
  line-height: 1.6;
  font-weight: 500;
  transition: color 0.15s;
}

.confirm-label:hover .confirm-text {
  color: #1c1917;
}

/* Spinner */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #a8a29e;
  border-top-color: transparent;
  border-radius: 9999px;
  animation: spin 1s linear infinite;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border: 2px solid #a8a29e;
  border-top-color: transparent;
  border-radius: 9999px;
  animation: spin 1s linear infinite;
}
