/**
 * File: TC-Hugsweier/css/anmeldung.css
 * Path: /css/anmeldung.css
 * 
 * Purpose:
 * - Mitgliedschafts-Anmeldeformular Styles
 * - Mehrstufiges Formular mit Progress Bar
 * - Responsive Design für alle Geräte
 * - Animationen und Transitions
 * 
 * Dependencies:
 * - css/style.css (muss zuerst geladen werden!)
 * - Bootstrap 5.3.2
 * - FontAwesome 6.5.1
 * - js/jquery-3.7.1.min.js
 * - js/anmeldung.js
 * 
 * Sections:
 * 1. CSS Variables
 * 2. Progress Bar
 * 3. Form Card
 * 4. Form Controls
 * 5. Membership Cards
 * 6. Action Buttons
 * 7. Validation States
 * 8. Animations
 * 9. Success Screen
 * 10. Responsive Design
 * 
 * Created: 2026-02-02
 * Author: TC Hugsweier Webteam
 * Version: 1.0.0
 */

/* ========================================
   1. CSS VARIABLES
======================================== */

:root {
  --tennis-blue: #1e40af;
  --tennis-light-blue: #3b82f6;
  --tennis-accent: #06b6d4;
  --success-green: #059669;
  --error-red: #dc2626;
  --warning-orange: #ea580c;
  --bg-light: #f8fafc;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* ========================================
   2. PROGRESS BAR
======================================== */

/**
 * Progress Container - Wrapper für Progress Steps
 */
.progress-container {
  margin-bottom: 2rem;
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

/**
 * Progress Steps - Horizontale Step-Anzeige
 */
.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/**
 * Step - Einzelner Progress-Step
 */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

/**
 * Verbindungslinie zwischen Steps
 */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  right: -40%;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.step.active:not(:last-child)::after {
  background: var(--tennis-blue);
}

/**
 * Step Icon - Kreisförmiger Step-Indikator
 */
.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.step.active .step-icon {
  background: var(--tennis-blue);
  color: white;
}

.step.completed .step-icon {
  background: var(--success-green);
  color: white;
}

/**
 * Step Label - Beschriftung unter Step-Icon
 */
.step-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.step.active .step-label {
  color: var(--tennis-blue);
  font-weight: 600;
}

/* ========================================
   3. FORM CARD
======================================== */

/**
 * Main Container - Wrapper für das gesamte Formular
 */
.main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem 8rem;
}

/**
 * Form Card - Container für Formular-Seiten
 */
.form-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: none;
  margin-bottom: 2rem;
}

/**
 * Page Title - Überschrift jeder Formular-Seite
 */
.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tennis-blue);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ========================================
   4. FORM CONTROLS
======================================== */

/**
 * Form Group - Container für einzelnes Formularfeld
 */
.form-group {
  margin-bottom: 1.5rem;
}

/**
 * Form Label - Beschriftung von Formularfeldern
 */
.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/**
 * Required Indicator - Pflichtfeld-Kennzeichnung
 */
.required::after {
  content: '*';
  color: var(--error-red);
  margin-left: 0.25rem;
}

/**
 * Form Control - Input-Felder (Text, Email, Tel, etc.)
 */
.form-control {
  border: 2px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  width: 100%;
}

.form-control:focus {
  border-color: var(--tennis-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  outline: none;
}

/**
 * Form Control Validation States
 */
.form-control.is-valid {
  border-color: var(--success-green);
  background-image: none;
}

.form-control.is-invalid {
  border-color: var(--error-red);
  background-image: none;
}

/**
 * Form Row - Zwei-Spalten-Layout
 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ========================================
   5. MEMBERSHIP CARDS
======================================== */

/**
 * Membership Card - Auswählbare Mitgliedschafts-Option
 */
.membership-card {
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.membership-card:hover {
  border-color: var(--tennis-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/**
 * Selected State - Ausgewählte Mitgliedschaft
 */
.membership-card.selected {
  border-color: var(--tennis-blue);
  background: rgba(30, 64, 175, 0.05);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/**
 * Checkmark - Häkchen bei ausgewählter Card
 */
.membership-card.selected::after {
  content: '✓';
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--tennis-blue);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

/**
 * Membership Price - Preis-Anzeige
 */
.membership-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tennis-blue);
}

/* ========================================
   6. ACTION BUTTONS
======================================== */

/**
 * Actions Container - Fixed Bottom Bar
 */
.actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
  z-index: 1000;
}

.actions .container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/**
 * Button Base Styles
 */
.btn {
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-transform: none;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

/**
 * Primary Button - Hauptaktions-Button (Weiter/Absenden)
 */
.btn-primary {
  background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-light-blue));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

/**
 * Secondary Button - Zurück-Button
 */
.btn-secondary {
  background: var(--border-light);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: #cbd5e1;
  color: var(--text-dark);
}

/**
 * Disabled State - Deaktivierte Buttons
 */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================================
   7. VALIDATION STATES
======================================== */

/**
 * Conditional Field - Bedingt angezeigte Felder
 */
.conditional-field {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 1rem;
  border-left: 4px solid var(--tennis-accent);
}

/**
 * Checkbox Container
 */
.form-check {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--tennis-blue);
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
}

.form-check-label {
  font-size: 0.95rem;
  line-height: 1.6;
  cursor: pointer;
}

/* ========================================
   8. ANIMATIONS
======================================== */

/**
 * Shake Animation - Bei Validierungs-Fehler
 */
.shake {
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/**
 * Fade-In Animation - Beim Seitenwechsel
 */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/**
 * Success Pulse - Bei erfolgreicher Eingabe
 */
.success-pulse {
  animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0.1); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/**
 * Loading State Animation
 */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ========================================
   9. SUCCESS SCREEN
======================================== */

/**
 * Success Container - Erfolgsmeldung
 */
.success-container {
  text-align: center;
  padding: 3rem 2rem;
}

/**
 * Success Icon - Großes Häkchen
 */
.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-green);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: white;
  font-size: 2rem;
}

/* ========================================
   10. RESPONSIVE DESIGN
======================================== */

/**
 * Tablet Anpassungen
 */
@media (max-width: 992px) {
  .form-card {
    padding: 2rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
}

/**
 * Mobile Anpassungen (Smartphones)
 */
@media (max-width: 768px) {
  /* Kleinere Padding-Werte */
  .form-card {
    padding: 1.5rem;
    border-radius: 1rem;
  }
  
  .page-title {
    font-size: 1.3rem;
  }
  
  /* Einspaltige Form-Row */
  .form-row {
    grid-template-columns: 1fr;
  }
  
  /* Actions vertical statt horizontal */
  .actions .container {
    flex-direction: column;
  }
  
  /* Buttons volle Breite */
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Progress Steps vertikal */
  .progress-steps {
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Keine Verbindungslinien auf Mobile */
  .step::after {
    display: none;
  }
  
  /* Mehr Platz für fixed Actions */
  .main-container {
    padding-bottom: 12rem;
  }
}

/**
 * Kleine Smartphones
 */
@media (max-width: 576px) {
  .form-card {
    padding: 1rem;
  }
  
  .page-title {
    font-size: 1.2rem;
    flex-direction: column;
  }
  
  .form-control {
    padding: 0.75rem 0.875rem;
    font-size: 0.95rem;
  }
  
  .membership-card {
    padding: 1rem;
  }
  
  .actions {
    padding: 1rem;
  }
}

/* ========================================
   11. UTILITIES
======================================== */

/**
 * Utility Classes
 */
.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

/* ========================================
   12. PRINT STYLES
======================================== */

/**
 * Druck-Optimierung
 */
@media print {
  .progress-container,
  .actions,
  .btn {
    display: none !important;
  }
  
  .form-card {
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  
  .main-container {
    padding-bottom: 0;
  }
}