/* ========================================================
   Dia Park Premier - Restaurant Booking System
   Modern, Elegant Luxury Hospitality Styling
   ======================================================== */

:root {
  --primary: #a31d1d;
  --primary-dark: #7a1515;
  --secondary: #1a1a2e;
  --accent-gold: #c5a059;
  --accent-gold-light: #f7eedd;
  --bg-light: #f8f9fc;
  --card-bg: #ffffff;
  --text-dark: #22252a;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.12), 0 8px 10px -6px rgba(0,0,0,0.08);
  --shadow-modal: 0 25px 50px -12px rgba(0,0,0,0.25);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
}

/* Background Wrapper */
.booking-page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 30px 15px;
}

.booking-container {
  max-width: 760px;
  width: 100%;
  margin: auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  animation: slideUp 0.35s ease-out forwards;
}

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

/* Header */
.booking-header {
  background: #1a1a2e;
  padding: 24px 30px;
  color: #fff;
  position: relative;
  border-bottom: 3px solid var(--accent-gold);
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.brand-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  margin-bottom: 2px;
}

.brand-subtitle {
  font-size: 13px;
  color: #c4c7d4;
  font-weight: 400;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  background: rgba(255,255,255,0.1);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-gold);
  color: #1a1a2e;
}

/* Form Body */
.booking-body {
  padding: 30px;
}

/* Restaurant Highlight Card */
.restaurant-card {
  background: #faf6ed;
  border: 1px solid #ebd7b2;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.res-info h4 {
  font-size: 16px;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 3px;
}

.res-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.res-capacity-badge {
  background: #fff;
  border: 1px solid #ebd7b2;
  color: #8c6828;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Grid Layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.full-col {
  grid-column: span 2;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-label .req {
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(163, 29, 29, 0.12);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Phone Input Group */
.phone-group {
  display: flex;
  gap: 8px;
}

.country-select {
  width: 110px;
  flex-shrink: 0;
}

/* Checkbox Style */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin: 10px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-text {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.3px;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Success View */
.booking-success-view {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 70px;
  height: 70px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

.success-ref-card {
  display: inline-block;
  background: #fdf8e2;
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 15px 30px;
  margin: 20px 0;
}

.success-ref-card span {
  font-size: 12px;
  text-transform: uppercase;
  color: #8c6828;
  display: block;
  font-weight: 600;
}

.success-ref-card strong {
  font-size: 24px;
  color: var(--primary);
  letter-spacing: 1px;
}

.success-details {
  background: #f9fafb;
  border-radius: var(--radius-md);
  padding: 20px;
  max-width: 480px;
  margin: 0 auto 25px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.success-details-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.success-details-row:last-child {
  border-bottom: none;
}

.success-details-row .label {
  color: var(--text-muted);
}

.success-details-row .val {
  font-weight: 600;
  color: var(--text-dark);
}

/* Footer / Back link */
.booking-footer {
  padding: 18px 30px;
  background: #f9fafb;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s ease-in-out infinite;
}

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

/* Error Alert */
.alert-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  display: none;
}

/* Responsive */
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full-col {
    grid-column: span 1;
  }
  .booking-body {
    padding: 20px;
  }
  .booking-header {
    padding: 20px;
  }
  .restaurant-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Header Actions & Auth Bar */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-btn-login {
  background: var(--accent-gold);
  color: #1a1a2e;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.auth-btn-login:hover {
  background: #f0c36d;
  transform: translateY(-1px);
}

.auth-btn-dash {
  background: #2563eb;
  color: #ffffff;
}

.auth-btn-dash:hover {
  background: #1d4ed8;
}

.auth-btn-logout {
  background: #dc2626;
  color: #ffffff;
}

.auth-btn-logout:hover {
  background: #b91c1c;
}
