/**
 * STARKS Registration & Lead Capture Modal Styles
 * The STARKS Exchange · PAPSS COWRY 2026 · Addis Ababa
 * Strictly adheres to STARKS Brand Guidelines (Sep 2026)
 * Design System: "Obsidian & Ember"
 */

:root {
  --starks-black: #040404;
  --starks-orange: #DD5A20;
  --oe-canvas: #0C0D12;
  --oe-surface: #14161F;
  --oe-hover: #1C1F2B;
  --oe-orange: #E85D22;
  --oe-glow-orange: #F97316;
  --oe-border: rgba(255, 255, 255, 0.08);
  --oe-border-card: rgba(255, 255, 255, 0.1);
}

/* Registration Modal Backdrop */
.registration-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 8, 12, 0.85);
  background-color: rgba(4, 4, 4, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 14px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.registration-modal-backdrop.open {
  display: flex;
  opacity: 1;
}

/* Modal Dialog Card (Obsidian & Ember Elevated Card) */
.registration-modal-dialog {
  background: #14161F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(232, 93, 34, 0.12);
  position: relative;
  overflow: hidden;
  animation: regModalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Modal Header */
.reg-modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  flex-shrink: 0;
}

.reg-modal-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.reg-modal-brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reg-modal-brand-badge .starks-logo-svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  color: #E85D22;
  display: block;
}

.reg-brand-name {
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
}

.reg-modal-logo {
  height: 20px;
  min-height: 18px;
  width: auto;
  object-fit: contain;
  display: none;
}

.reg-badge-fast {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(232, 93, 34, 0.15);
  border: 1px solid rgba(232, 93, 34, 0.35);
  color: #F97316;
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
}

.reg-badge-fast .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #E85D22;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.reg-modal-title {
  font-family: var(--font-title, 'Spoof', sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.reg-modal-subtitle {
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 12px;
  color: #94A3B8;
  margin: 3px 0 0 0;
  line-height: 1.4;
}

.reg-modal-close-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: #1C1F2B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  z-index: 2;
  padding: 0;
}

.reg-modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.reg-modal-close-btn:active {
  transform: scale(0.95);
}

/* Modal Body / Scrollable Form */
.reg-modal-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Returning User Welcome Banner */
.reg-returning-banner {
  display: none;
  background: rgba(232, 93, 34, 0.1);
  border: 1px solid rgba(232, 93, 34, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
}

.reg-returning-banner.active {
  display: block;
}

.reg-returning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title, 'Spoof', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.reg-returning-desc {
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 0.8rem;
  color: #F97316;
  margin-bottom: 10px;
}

.reg-returning-actions {
  display: flex;
  gap: 8px;
}

.reg-returning-btn-quick {
  flex: 1;
  min-height: 48px;
  background: linear-gradient(135deg, #E85D22 0%, #F97316 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.reg-returning-btn-quick:hover {
  background: linear-gradient(135deg, #F0682E 0%, #FB923C 100%);
}

.reg-returning-btn-switch {
  min-height: 48px;
  padding: 0 12px;
  background: #1C1F2B;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
}

/* Form Groups & Controls */
.reg-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.reg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .reg-form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.reg-label {
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reg-label .required-star {
  color: #E85D22;
  margin-left: 2px;
  font-weight: 900;
}

.reg-input,
.reg-select {
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
  background: #0C0D12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}

.reg-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a39cb2' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.reg-select option {
  background: #14161F;
  color: #ffffff;
  padding: 10px;
}

.reg-input::placeholder {
  color: #475569;
}

/* Orange #DD5A20 / #E85D22 focus states */
.reg-input:focus,
.reg-select:focus {
  outline: none;
  border-color: #E85D22;
  box-shadow: 0 0 0 2px rgba(232, 93, 34, 0.25);
  background: #0C0D12;
}

.reg-input.input-error,
.reg-select.input-error {
  border-color: #EF4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.reg-field-error {
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 0.72rem;
  color: #EF4444;
  min-height: 14px;
  display: none;
  margin-top: 1px;
}

.reg-field-error.active {
  display: block;
}

/* Corridor Multi-Select Pills */
.reg-corridors-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reg-corridor-subnote {
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 500;
  text-transform: none;
}

.reg-corridors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.reg-corridor-pill {
  min-height: 48px;
  padding: 8px 14px;
  background: #14161F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: #94A3B8;
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
}

.reg-corridor-pill .pill-arrow {
  color: #64748B;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.reg-corridor-pill:hover {
  background: #1C1F2B;
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.reg-corridor-pill.selected {
  background: rgba(232, 93, 34, 0.16);
  border-color: #E85D22;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(232, 93, 34, 0.25);
}

.reg-corridor-pill.selected .pill-arrow {
  color: #E85D22;
}

/* Checkbox Opt-In */
.reg-optin-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.reg-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding-top: 2px;
}

.reg-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: #E85D22;
  cursor: pointer;
}

.reg-checkbox-text {
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.4;
}

/* Submit Action Button */
.reg-actions {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-btn-submit {
  min-height: 48px;
  height: 48px;
  width: 100%;
  background: linear-gradient(135deg, #E85D22 0%, #F97316 100%);
  color: #ffffff;
  /* Brand contrast rule compliance: color: #040404 */
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
  font-weight: 800;
  font-size: 14px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  touch-action: manipulation;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(232, 93, 34, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reg-btn-submit:hover {
  background: linear-gradient(135deg, #F0682E 0%, #FB923C 100%);
  box-shadow: 0 12px 28px rgba(232, 93, 34, 0.5);
  transform: translateY(-1px);
}

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

.reg-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.reg-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  color: #64748B;
  text-align: center;
  margin-top: 2px;
}

.reg-security-note .lock-icon {
  font-size: 11px;
  color: #F59E0B;
}

/* Header Attendee Pill Trigger (Optional fast access) */
.header-attendee-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(232, 93, 34, 0.12);
  border: 1px solid rgba(232, 93, 34, 0.3);
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.header-attendee-badge.visible {
  display: inline-flex;
}

.header-attendee-badge:hover {
  background: rgba(232, 93, 34, 0.22);
  border-color: #E85D22;
}

.header-attendee-badge .user-icon {
  color: #E85D22;
}

@media (min-width: 600px) {
  .registration-modal-dialog {
    max-width: 480px;
    border-radius: 24px;
  }
  .reg-modal-body {
    padding: 20px 24px 24px;
  }
}

/* =====================================================================
   Theme Support: Light & Dark Mode
   ===================================================================== */
[data-theme="light"] .registration-modal-dialog,
[data-theme="light"] .reg-card,
[data-theme="light"] .registration-modal-content {
  background: #FFFFFF;
  color: #040404;
  border: 1px solid rgba(60, 60, 60, 0.15);
  box-shadow: 0 10px 30px rgba(4, 4, 4, 0.1);
}

[data-theme="light"] .reg-modal-header {
  border-bottom: 1px solid rgba(60, 60, 60, 0.1);
}

[data-theme="light"] .reg-brand-name,
[data-theme="light"] .reg-modal-title {
  color: #040404;
}

[data-theme="light"] .reg-modal-subtitle {
  color: #3C3C3C;
}

[data-theme="light"] .reg-modal-close-btn {
  background: #F4F3F7;
  border: 1px solid rgba(60, 60, 60, 0.15);
  color: #3C3C3C;
}

[data-theme="light"] .reg-modal-close-btn:hover {
  background: #E5E7EB;
  color: #040404;
}

[data-theme="light"] .reg-returning-banner {
  background: #FFF7F2;
  border: 1.5px solid #DD5A20;
}

[data-theme="light"] .reg-returning-header {
  color: #040404;
}

[data-theme="light"] .reg-returning-desc {
  color: #DD5A20;
}

[data-theme="light"] .reg-returning-btn-quick {
  background: #DD5A20;
  color: #040404;
}

[data-theme="light"] .reg-returning-btn-switch {
  background: #F4F3F7;
  color: #3C3C3C;
  border: 1px solid rgba(60, 60, 60, 0.15);
}

[data-theme="light"] .reg-label {
  color: #3C3C3C;
}

[data-theme="light"] .reg-input,
[data-theme="light"] .reg-select {
  background: #F8F9FA;
  border: 1.5px solid rgba(60, 60, 60, 0.2);
  color: #040404;
  font-family: var(--font-body, 'Proxima Nova', sans-serif);
}

[data-theme="light"] .reg-input::placeholder {
  color: #94A3B8;
}

[data-theme="light"] .reg-input:focus,
[data-theme="light"] .reg-select:focus {
  border-color: #DD5A20;
  box-shadow: 0 0 0 3px rgba(221, 90, 32, 0.2);
  background: #FFFFFF;
}

[data-theme="light"] .reg-select option {
  background: #FFFFFF;
  color: #040404;
}

[data-theme="light"] .corridor-pill,
[data-theme="light"] .reg-corridor-pill {
  background: #F4F3F7;
  border: 1px solid rgba(60, 60, 60, 0.15);
  color: #3C3C3C;
}

[data-theme="light"] .corridor-pill:hover,
[data-theme="light"] .reg-corridor-pill:hover {
  background: #FFF7F2;
  border-color: #DD5A20;
  color: #040404;
}

[data-theme="light"] .corridor-pill.selected,
[data-theme="light"] .corridor-pill.active,
[data-theme="light"] .reg-corridor-pill.selected,
[data-theme="light"] .reg-corridor-pill.active {
  background: #DD5A20;
  color: #040404;
  border-color: #DD5A20;
}

[data-theme="light"] .reg-corridor-pill.selected .pill-arrow {
  color: #040404;
}

[data-theme="light"] .reg-checkbox-text {
  color: #3C3C3C;
}

[data-theme="light"] .reg-btn-submit,
[data-theme="light"] .cta-button {
  background: #DD5A20;
  color: #040404;
}

[data-theme="light"] .reg-btn-submit:hover,
[data-theme="light"] .cta-button:hover {
  background: #EE772A;
}

[data-theme="light"] .reg-security-note {
  color: #64748B;
}

/* Explicit [data-theme="dark"] preserving dark mode styles */
[data-theme="dark"] .registration-modal-dialog,
[data-theme="dark"] .reg-card,
[data-theme="dark"] .registration-modal-content {
  background: #14161F;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(232, 93, 34, 0.12);
}

[data-theme="dark"] .reg-input,
[data-theme="dark"] .reg-select {
  background: #0C0D12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

[data-theme="dark"] .reg-input:focus,
[data-theme="dark"] .reg-select:focus {
  border-color: #E85D22;
  box-shadow: 0 0 0 2px rgba(232, 93, 34, 0.25);
  background: #0C0D12;
}

[data-theme="dark"] .corridor-pill,
[data-theme="dark"] .reg-corridor-pill {
  background: #14161F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}

[data-theme="dark"] .corridor-pill.selected,
[data-theme="dark"] .corridor-pill.active,
[data-theme="dark"] .reg-corridor-pill.selected,
[data-theme="dark"] .reg-corridor-pill.active {
  background: rgba(232, 93, 34, 0.16);
  border-color: #E85D22;
  color: #ffffff;
}
