/* =============================================================================
   Basefit Geretsried – Registrierungsformular
   CI-Farben: Dunkelgrau #3A3A3A, Lime-Grün #DFFF00, Dunkles Lime #8a9900
   Schrift: Open Sans
   ============================================================================= */

/* Google Fonts: Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap');

/* Reset & Basis */
#basefit-registration-wrap *,
#basefit-registration-wrap *::before,
#basefit-registration-wrap *::after {
    box-sizing: border-box;
}

#basefit-registration-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #3A3A3A;
    line-height: 1.6;
}

/* =============================================================================
   Ladeindikator
   ============================================================================= */
.basefit-loader {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.basefit-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top-color: #DFFF00;
    border-radius: 50%;
    animation: basefit-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

/* =============================================================================
   Fortschrittsbalken
   ============================================================================= */
.basefit-progress {
    margin-bottom: 36px;
}

.basefit-progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 8px;
}

.basefit-progress-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.basefit-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.step-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s;
}

.basefit-step.active .step-number {
    background: #3A3A3A;
    color: #DFFF00;
    box-shadow: 0 0 0 4px rgba(58, 58, 58, 0.15);
}

.basefit-step.active .step-label {
    color: #3A3A3A;
    font-weight: 700;
}

.basefit-step.completed .step-number {
    background: #8a9900;
    color: #fff;
}

.basefit-step.completed .step-number::after {
    content: '✓';
}

.basefit-step.completed .step-label {
    color: #8a9900;
}

/* =============================================================================
   Globale Fehlermeldung
   ============================================================================= */
.basefit-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.basefit-alert-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #c0392b;
}

.basefit-alert-success {
    background: #f4ffd6;
    border: 1px solid #DFFF00;
    color: #3A3A3A;
}

/* =============================================================================
   Tarif-Karten (Premium-Design)
   ============================================================================= */
.basefit-bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
    align-items: stretch;
}

.basefit-bundle-card {
    background: #fff;
    border: 2px solid #3A3A3A;
    border-radius: 4px;
    padding: 40px 32px 36px;
    cursor: default;
    transition: border-color 0.25s, box-shadow 0.25s;
    position: relative;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.basefit-bundle-card.selected {
    border-color: #3A3A3A;
    background: #dfff00;
    box-shadow: 0 8px 30px rgba(58, 58, 58, 0.18);
}

.basefit-bundle-card.selected::after {
    content: '✓';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: #3A3A3A;
    color: #DFFF00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.basefit-bundle-highlighted {
    border-color: #3A3A3A;
}

/* ===== Angebots-Highlighting ===== */
.basefit-bundle-angebot {
    border: 2px solid #DFFF00;
    background: linear-gradient(180deg, #f9ffe6 0%, #fff 40%);
    box-shadow: 0 4px 20px rgba(223, 255, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: scale(1.03);
    z-index: 2;
    position: relative;
}

.basefit-bundle-angebot:hover {
    box-shadow: 0 8px 30px rgba(223, 255, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.basefit-badge-angebot {
    background: #DFFF00;
    color: #3A3A3A;
    font-size: 12px;
    padding: 4px 16px;
    letter-spacing: 1px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(223, 255, 0, 0.4); }
    50% { box-shadow: 0 0 12px 4px rgba(223, 255, 0, 0.3); }
}

.basefit-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #3A3A3A;
    color: #DFFF00;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.basefit-bundle-name {
    font-size: 22px;
    font-weight: 700;
    font-style: italic;
    margin: 0 0 4px;
    color: #3A3A3A;
}

.basefit-bundle-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px;
}

.basefit-bundle-features {
    padding: 0;
    margin: 20px 0 0;
    font-size: 15px;
    width: 100%;
    text-align: left;
    flex-grow: 1;
}

.basefit-feature-item {
    padding: 6px 0;
    padding-left: 28px;
    text-indent: -28px;
    color: #3A3A3A;
    line-height: 1.5;
    background-repeat: no-repeat;
}

.basefit-runtimes {
    margin-top: 8px;
    width: 100%;
    text-align: center;
}

.basefit-price {
    font-size: 28px;
    font-weight: 400;
    font-style: italic;
    color: #111317;
    margin: 4px 0;
}

.basefit-price-interval {
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    color: #111317;
}

.basefit-flat-fee {
    font-size: 13px;
    color: #111317;
    margin-top: 4px;
}

.basefit-runtime-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
    background: #fff;
    font-family: 'Open Sans', sans-serif;
}

/* Laufzeit-Tabs */
.basefit-runtime-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.basefit-runtime-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.basefit-runtime-tab:hover {
    color: #3A3A3A;
}

.basefit-runtime-tab.active {
    color: #3A3A3A;
    border-bottom-color: #3A3A3A;
}

.basefit-flat-fees-wrap {
    text-align: center;
}

.basefit-fine-print {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.basefit-fine-print .basefit-flat-fee {
    font-size: 11px;
    color: #999;
}

.basefit-card-bottom {
    margin-top: auto;
    width: 100%;
}

.basefit-btn-select {
    margin-top: 0;
    width: 100%;
    justify-content: center;
}

/* =============================================================================
   Formular
   ============================================================================= */
.basefit-step-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #3A3A3A;
}

.basefit-step-desc {
    font-size: 15px;
    color: #555;
    margin: 0 0 16px;
}

.basefit-section-title {
    font-size: 17px;
    font-weight: 700;
    margin: 16px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
    color: #3A3A3A;
}

.basefit-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.basefit-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.basefit-field-half {
    flex: 1;
    min-width: calc(50% - 8px);
}

.basefit-field-third {
    flex: 1;
    min-width: calc(33% - 8px);
}

.basefit-field-two-thirds {
    flex: 2;
    min-width: calc(66% - 8px);
}

.basefit-field label {
    font-size: 13px;
    font-weight: 600;
    color: #3A3A3A;
    margin-bottom: 4px;
}

.basefit-field input[type="text"],
.basefit-field input[type="email"],
.basefit-field input[type="tel"],
.basefit-field input[type="date"],
.basefit-field input[type="password"],
.basefit-field select,
.basefit-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    color: #3A3A3A;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Open Sans', sans-serif;
}

.basefit-field input:focus,
.basefit-field select:focus,
.basefit-field textarea:focus {
    border-color: #3A3A3A;
    box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.35);
}

.basefit-field input.basefit-field-error,
.basefit-field select.basefit-field-error {
    border-color: #c0392b;
    background: #fff9f8;
}

.basefit-error-msg {
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
    min-height: 18px;
    display: block;
}

.required {
    color: #c0392b;
}

/* IBAN */
.basefit-iban-input {
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.basefit-iban-bank {
    font-size: 12px;
    color: #8a9900;
    margin-top: 4px;
    font-weight: 600;
}

/* Checkbox */
.basefit-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #3A3A3A;
    cursor: pointer;
    line-height: 1.5;
}

.basefit-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    cursor: pointer;
    accent-color: #3A3A3A;
}

/* =============================================================================
   SEPA-Box
   ============================================================================= */
.basefit-sepa-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 24px 0;
}

.basefit-sepa-box h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #3A3A3A;
}

.basefit-sepa-text {
    font-size: 13px;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Unterschrift-Pad */
.basefit-signature-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 24px 0;
}

.basefit-signature-box h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #3A3A3A;
}

.basefit-signature-hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.basefit-signature-wrapper {
    position: relative;
}

#basefit-signature-pad {
    width: 100%;
    max-width: 600px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
    display: block;
}

#basefit-signature-pad:hover,
#basefit-signature-pad:active {
    border-color: #3A3A3A;
}

#basefit-signature-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    padding: 4px 12px;
}

.basefit-btn-small {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
}

.basefit-sepa-accept {
    margin-top: 12px;
    font-weight: 500;
}

/* AGB */
.basefit-legal-box {
    margin: 16px 0 24px;
    font-size: 14px;
}

.basefit-legal-box a {
    color: #8a9900;
    text-decoration: underline;
}

.basefit-legal-box a:hover {
    color: #3A3A3A;
}

/* =============================================================================
   Zusammenfassung
   ============================================================================= */
.basefit-summary {
    background: #fff;
    border: 2px solid #3A3A3A;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.basefit-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.basefit-summary-section h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8a9900;
    margin: 0 0 6px;
}

.basefit-summary-section p {
    font-size: 14px;
    color: #3A3A3A;
    margin: 0;
    line-height: 1.6;
}

/* =============================================================================
   Navigation-Buttons
   ============================================================================= */
.basefit-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    gap: 12px;
}

.basefit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
    outline: none;
    line-height: 1;
    font-family: 'Open Sans', sans-serif;
}

.basefit-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.5);
}

.basefit-btn:active {
    transform: scale(0.97);
}

.basefit-btn-primary {
    background: #3A3A3A;
    color: #DFFF00;
}

.basefit-btn-primary:hover {
    background: #111111;
}

.basefit-btn-primary:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.basefit-btn-secondary {
    background: #f0f0f0;
    color: #3A3A3A;
}

.basefit-btn-secondary:hover {
    background: #e0e0e0;
}

.basefit-btn-large {
    padding: 16px 36px;
    font-size: 17px;
    border-radius: 10px;
    margin-left: auto;
}

/* =============================================================================
   Erfolgs-Box
   ============================================================================= */
.basefit-success-box {
    text-align: center;
    padding: 60px 30px;
    background: #f4ffd6;
    border: 2px solid #DFFF00;
    border-radius: 16px;
    margin-top: 24px;
}

.basefit-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.basefit-success-box h2 {
    font-size: 28px;
    font-weight: 800;
    color: #3A3A3A;
    margin: 0 0 12px;
}

.basefit-success-text {
    font-size: 16px;
    color: #3A3A3A;
    max-width: 480px;
    margin: 0 auto;
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 600px) {
    .basefit-bundles-grid {
        grid-template-columns: 1fr;
    }

    .basefit-form-row {
        flex-direction: column;
        gap: 12px;
    }

    .basefit-field-half,
    .basefit-field-third,
    .basefit-field-two-thirds {
        min-width: 100%;
    }

    .basefit-progress-steps::before {
        display: none;
    }

    .step-label {
        font-size: 10px;
    }

    .basefit-form-nav {
        flex-direction: column-reverse;
    }

    .basefit-btn-large {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .basefit-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .basefit-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .step-label { display: none; }
    .step-number { width: 28px; height: 28px; font-size: 13px; }
}
