/* Voyager Guest Portal - SpaceX Theme */

:root {
  /* SpaceX Brand Colors */
  --spacex-blue-primary: #2c74ff;
  --spacex-blue-accent: #b2c5ff;
  --spacex-blue-contrast: #002b72;

  /* Backgrounds (Dark Theme) */
  --bg-page: #000;
  --bg-card: #1c1f22;
  --bg-card-alt: #1d1d1d;
  --bg-input: #1a1a1a;

  /* Text Colors */
  --text-primary: #fff;
  --text-secondary: #898989;
  --text-light: #ccc;

  /* Status Colors */
  --success-green: #28a745;
  --error-red: #dc3545;
  --warning-yellow: #ffc107;

  /* Borders & Dividers */
  --border-color: #333;
  --border-color-light: #3e3e3e;

  /* Design System */
  --border-radius: 2px;
  --border-radius-button: 0px;
  --spacing-unit: 1rem;
  --spacing-large: 2rem;

  /* Shadows */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-button-hover: 0 4px 16px rgba(44, 116, 255, 0.4);
}

/* D-DIN Font Family */
@font-face {
  font-family: "D-DIN";
  src: url("fonts/D-DIN.woff2") format("woff2"),
       url("fonts/D-DIN.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "D-DIN-Bold";
  src: url("fonts/D-DIN-Bold.woff2") format("woff2"),
       url("fonts/D-DIN-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

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

body {
  font-family: "D-DIN", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  background-image: url('images/spacex-dark-theme-bg.jpg');
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: 100% 12vw;
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  padding-bottom: calc(20px + 12vw);
}

.container {
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2 {
  font-family: "D-DIN-Bold", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
}

h1 {
  font-size: 28px;
  margin: 0;
}

h2 {
  font-size: 22px;
  margin-bottom: var(--spacing-unit);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-unit);
}

h3 {
  font-family: "D-DIN-Bold", sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--text-primary);
}

p, span, button, input {
  font-family: "D-DIN", sans-serif;
}

strong, b {
  font-family: "D-DIN-Bold", sans-serif;
  font-weight: 700;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(44, 116, 255, 0.5));
}

.logo h1 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
}

/* Loading */
.loading {
  text-align: center;
  color: var(--text-primary);
}

.spinner {
  border: 4px solid rgba(44, 116, 255, 0.2);
  border-top: 4px solid var(--spacex-blue-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error */
.error {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  text-align: center;
  border: 1px solid var(--error-red);
}

.error-icon {
  font-size: 60px;
  margin-bottom: 20px;
}

.error h2 {
  color: var(--error-red);
  margin-bottom: 15px;
  border-bottom: none;
  padding-bottom: 0;
}

.error p {
  color: var(--text-secondary);
  margin-bottom: 25px;
}

/* Booking Card */
.booking {
  animation: fadeIn 0.5s ease-in;
}

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

.card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.card h2 {
  color: var(--spacex-blue-primary);
  margin-bottom: 25px;
  font-size: 24px;
}

.booking-info {
  margin-bottom: 25px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.label {
  font-weight: 400;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.value {
  font-weight: 700;
  color: var(--text-primary);
}

.status {
  padding: 6px 14px;
  border-radius: var(--border-radius);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status.confirmed {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status.checked-in {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status.checked-out {
  background: rgba(136, 152, 170, 0.15);
  color: #8898aa;
  border: 1px solid rgba(136, 152, 170, 0.3);
}

/* Actions */
.actions {
  margin-top: 25px;
}

.btn {
  width: 100%;
  padding: 15px 30px;
  border: none;
  border-radius: var(--border-radius-button);
  font-size: 16px;
  font-weight: 700;
  font-family: "D-DIN-Bold", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--spacex-blue-primary);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--spacex-blue-accent);
  color: var(--bg-page);
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

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

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

.btn:disabled {
  background: var(--border-color);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Success Message */
.success-message {
  margin-top: 25px;
  padding: 20px;
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  border-radius: var(--border-radius);
  text-align: center;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  background: var(--success-green);
  color: var(--bg-page);
  border-radius: 50%;
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 10px;
}

.success-message p {
  color: var(--success-green);
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Info Card */
.info-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  text-align: center;
  border: 1px solid var(--border-color);
}

.info-card h3 {
  color: var(--spacex-blue-primary);
  margin-bottom: 10px;
}

.info-card p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.phone {
  font-size: 20px;
  font-weight: 600;
  color: var(--spacex-blue-primary);
}

/* Code Entry Form */
.code-entry {
  animation: fadeIn 0.5s ease-in;
}

.code-entry .card {
  text-align: center;
}

.entry-instructions {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

.code-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 20px;
  font-weight: 700;
  font-family: "D-DIN-Bold", monospace;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.code-input:focus {
  outline: none;
  border-color: var(--spacex-blue-primary);
  box-shadow: 0 0 0 3px rgba(44, 116, 255, 0.2);
  background: #222;
}

.code-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
  font-weight: normal;
  letter-spacing: normal;
}

.input-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

.info-text {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.info-text p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* Keyboard Focus States */
*:focus-visible {
  outline: 2px solid var(--spacex-blue-primary);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--spacex-blue-primary);
  outline-offset: 3px;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Responsive - Mobile */
@media (max-width: 600px) {
  body {
    background-size: 100% 10vw;
    padding-bottom: calc(20px + 10vw);
  }

  .logo h1 {
    font-size: 22px;
  }

  .logo img {
    height: 40px;
  }

  .card {
    padding: 20px;
  }

  .card h2 {
    font-size: 20px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* Responsive - Tablet Landscape / Kiosk Mode */
@media (min-width: 768px) and (orientation: landscape) {
  body {
    background-size: 100% 15vw;
    padding-bottom: calc(20px + 15vw);
  }

  .container {
    max-width: 800px;
  }

  .card {
    padding: 40px;
  }

  .logo h1 {
    font-size: 32px;
  }

  .logo img {
    height: 60px;
  }

  .card h2 {
    font-size: 28px;
  }

  .btn {
    font-size: 18px;
    padding: 18px 36px;
  }
}

/* Modal Dialog */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-card);
  z-index: 1001;
}

.modal-content h3 {
  margin: 0 0 16px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-content p {
  margin: 0 0 24px 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-light);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-actions .btn {
  min-width: 120px;
  margin: 0;
  box-sizing: border-box;
}

.modal-actions .btn-primary {
  border: 1px solid transparent;
}

.modal-actions .btn-secondary {
  margin-top: 0;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 24px;
  }

  .modal-content h3 {
    font-size: 20px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }
}
