/* ==========================================================================
   CODE HEIST TEAM REGISTRATION & DIGITAL PASS MODAL
   Fixed Sticky Preview Badge on Right Side
   ========================================================================== */

/* Modal Overlay */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 4, 7, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #0A0E18;
  border-radius: var(--radius-2xl);
  max-width: 980px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden; /* Scroll handled internally */
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(220, 38, 38, 0.3);
  border: 1px solid rgba(220, 38, 38, 0.4);
  transform: scale(0.94) translateY(20px);
  transition: transform var(--transition-bounce), opacity var(--transition-smooth);
  position: relative;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
}

.modal-backdrop.open .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #141B2D;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close-btn:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

/* Modal Content Grid */
.modal-pass-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  max-height: 90vh;
  overflow: hidden;
  align-items: start;
}

.modal-form-side {
  padding: 36px;
  overflow-y: auto;
  max-height: 90vh;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #0A0E18;
}

/* Right Side: Sticky Pinned Badge (Never jumps or moves down) */
.modal-preview-side {
  padding: 36px 28px;
  background: radial-gradient(circle at 50% 40%, #1A070B 0%, #06080D 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  height: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Team Size Selector Pills */
.team-size-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.team-size-btn {
  background: #0F1422;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  color: #94A3B8;
  font-size: 0.8125rem;
  font-weight: 800;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.team-size-btn:hover {
  background: #141B2D;
  color: #FFFFFF;
  border-color: rgba(220, 38, 38, 0.4);
}

.team-size-btn.active {
  background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
  color: #FFFFFF;
  border-color: #EF4444;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.45);
}

/* Member Block Cards */
.member-block-card {
  background: #0F1422;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  transition: all var(--transition-smooth);
}

.member-block-card.leader-card {
  border-color: rgba(220, 38, 38, 0.35);
  background: #121727;
}

.member-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.leader-tag {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
}

.member-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

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

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #CBD5E1;
  margin-bottom: 5px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: #FFFFFF;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  background: #0B0E18;
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Holographic Digital Team Pass Card */
.festival-pass-badge {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(135deg, #1A070B 0%, #0B0E17 100%);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(220, 38, 38, 0.5);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.85), 0 0 35px rgba(220, 38, 38, 0.35);
  color: #FFFFFF;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s ease;
  flex-shrink: 0;
}

.festival-pass-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, transparent 40%, rgba(220, 38, 38, 0.2) 80%, transparent 100%);
  pointer-events: none;
}

.pass-header {
  padding: 16px 20px 12px 20px;
  border-bottom: 1px dashed rgba(220, 38, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pass-brand {
  font-weight: 900;
  font-size: 1.1875rem;
  letter-spacing: 0.02em;
}

.pass-tier-badge {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.pass-body {
  padding: 18px 20px;
}

.pass-event-name {
  font-size: 1.0625rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.pass-team-headline {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  color: #EF4444;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.pass-attendee-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.pass-field-label {
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94A3B8;
}

.pass-field-val {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pass Members Roster List */
.pass-roster-list {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 0.75rem;
}

.pass-roster-label {
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748B;
  margin-bottom: 4px;
}

.pass-roster-names {
  color: #CBD5E1;
  font-weight: 600;
  line-height: 1.4;
}

/* Pass Serial Bar (Clean, bold, scannable barcode layout) */
.pass-serial-bar {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

.pass-serial-label {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94A3B8;
  letter-spacing: 0.08em;
}

.pass-serial-id {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 900;
  color: #EF4444;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.pass-footer-barcode {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.6);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #64748B;
  letter-spacing: 0.3em;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Recruitment Modal */
.recruit-modal-layout {
  padding: 40px;
}

.recruit-header {
  text-align: center;
  margin-bottom: 32px;
}

.recruit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.department-radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.dept-card-radio {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: #0F1422;
  transition: all var(--transition-fast);
}

.dept-card-radio:hover {
  background: #141B2D;
  border-color: #EF4444;
}

.dept-card-radio.selected {
  background: rgba(220, 38, 38, 0.15);
  border-color: #EF4444;
  box-shadow: 0 0 0 2px #EF4444;
}

.dept-card-radio .dept-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.dept-card-radio .dept-name {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #FFFFFF;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-msg {
  background: #0F1422;
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-msg .toast-icon {
  color: #EF4444;
  font-size: 1.125rem;
}

@media (max-width: 900px) {
  .modal-pass-layout {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-form-side {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    max-height: none;
    overflow-y: visible;
  }
  .modal-preview-side {
    padding: 24px;
    position: static;
    max-height: none;
  }
}
