/**
 * TobiDu Ticket System - Selfservice Styles
 * Version: 1.0.0
 */

.tobidu-ss-hidden {
    display: none !important;
}

/* =============================================================================
   Wrapper
   ============================================================================= */

.tobidu-ss-wrap {
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    color: #111827;
    box-sizing: border-box;
}

/* =============================================================================
   Ladezustand
   ============================================================================= */

.tobidu-ss-loading {
    padding: 32px 0;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

/* =============================================================================
   Fehlermeldung
   ============================================================================= */

.tobidu-ss-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 6px;
    padding: 14px 16px;
    color: #b91c1c;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =============================================================================
   Header: Code + Status
   ============================================================================= */

.tobidu-ss-header {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 20px;
}

.tobidu-ss-code-label {
    font-size: 0.78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
}

.tobidu-ss-code {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #111827;
    margin: 0 0 10px;
}

.tobidu-ss-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tobidu-ss-badge-reserved   { background: #dcfce7; color: #15803d; }
.tobidu-ss-badge-checked_in { background: #dbeafe; color: #1d4ed8; }
.tobidu-ss-badge-cancelled  { background: #f3f4f6; color: #6b7280; }
.tobidu-ss-badge-expired    { background: #fef2f2; color: #b91c1c; }

/* =============================================================================
   Buchungsdetails
   ============================================================================= */

.tobidu-ss-details {
    margin: 0 0 20px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.tobidu-ss-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

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

.tobidu-ss-row dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

.tobidu-ss-row dd {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    text-align: right;
    margin: 0;
}

/* =============================================================================
   QR-Code
   ============================================================================= */

.tobidu-ss-qr-wrap {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.tobidu-ss-qr-img {
    display: block;
    margin: 0 auto 10px;
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.tobidu-ss-qr-hint {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
}

/* =============================================================================
   Storno-Bereich
   ============================================================================= */

.tobidu-ss-cancel-wrap {
    margin-bottom: 8px;
}

.tobidu-ss-cancel-btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: none !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-align: center !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
    -webkit-tap-highlight-color: transparent;
}

.tobidu-ss-cancel-btn:hover,
.tobidu-ss-cancel-btn:active {
    background: #fef2f2;
}

/* =============================================================================
   Bestätigungsdialog
   ============================================================================= */

.tobidu-ss-confirm-wrap {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 20px 16px;
    margin-bottom: 8px;
}

.tobidu-ss-confirm-text {
    font-size: 0.92rem;
    color: #374151;
    line-height: 1.5;
    margin: 0 0 16px;
    text-align: center;
}

.tobidu-ss-confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tobidu-ss-confirm-yes {
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
    padding: 11px 22px !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
    -webkit-tap-highlight-color: transparent;
}

.tobidu-ss-confirm-yes:active,
.tobidu-ss-confirm-yes:disabled {
    background: #b91c1c;
    opacity: 0.75;
}

.tobidu-ss-confirm-no {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    padding: 11px 22px !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
}

.tobidu-ss-confirm-no:active {
    background: #e5e7eb;
}

/* =============================================================================
   Storno erfolgreich
   ============================================================================= */

.tobidu-ss-done {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
    border-radius: 6px;
    padding: 14px 16px;
    color: #15803d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =============================================================================
   Umbuchung – Button öffnen
   ============================================================================= */

.tobidu-ss-reschedule-open-wrap {
    margin-top: 10px;
}

.tobidu-ss-reschedule-btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: none !important;
    border: 1px solid #86efac !important;
    color: #15803d !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-align: center !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
    -webkit-tap-highlight-color: transparent;
}

.tobidu-ss-reschedule-btn:hover,
.tobidu-ss-reschedule-btn:active {
    background: #f0fdf4;
}

/* =============================================================================
   Umbuchung – Formular
   ============================================================================= */

.tobidu-ss-reschedule-form {
    margin-top: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 16px;
    background: #f9fafb;
}

.tobidu-ss-reschedule-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
}

.tobidu-ss-field {
    margin-bottom: 14px;
}

.tobidu-ss-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.tobidu-ss-persons-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
}

.tobidu-ss-persons-select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.2);
}

.tobidu-ss-date-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.tobidu-ss-date-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.2);
}

.tobidu-ss-slots-loading {
    padding: 8px 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.tobidu-ss-slots-wrap {
    margin-top: 4px;
}

.tobidu-ss-slots-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.tobidu-ss-slot-btn {
    padding: 10px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: #374151;
    text-align: center;
}

.tobidu-ss-slot-btn:hover:not(:disabled) {
    border-color: #f59e0b;
    background: #fffbeb;
}

.tobidu-ss-slot-btn.tobidu-ss-slot-selected {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.tobidu-ss-slot-btn:disabled,
.tobidu-ss-slot-full {
    opacity: 0.4;
    cursor: not-allowed;
}

.tobidu-ss-slot-limited { border-color: #fcd34d; }
.tobidu-ss-slot-critical { border-color: #f97316; }

.tobidu-ss-reschedule-msg {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.tobidu-ss-reschedule-msg-error {
    background: #fef2f2;
    color: #b91c1c;
}

.tobidu-ss-reschedule-msg-info {
    background: #f0fdf4;
    color: #15803d;
}

.tobidu-ss-reschedule-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.tobidu-ss-reschedule-submit {
    flex: 1 !important;
    padding: 11px 10px !important;
    background: #1d4ed8 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
    -webkit-tap-highlight-color: transparent;
}

.tobidu-ss-reschedule-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tobidu-ss-reschedule-submit:not(:disabled):hover,
.tobidu-ss-reschedule-submit:not(:disabled):active {
    background: #1e40af;
}

.tobidu-ss-reschedule-abort {
    padding: 11px 16px !important;
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
}

.tobidu-ss-reschedule-abort:hover,
.tobidu-ss-reschedule-abort:active {
    background: #e5e7eb;
}

/* =============================================================================
   Responsive – Mobile
   ============================================================================= */

@media (max-width: 600px) {
    .tobidu-ss-wrap {
        padding: 0 12px;
    }

    .tobidu-ss-code {
        font-size: 1.4rem;
        letter-spacing: 0.08em;
    }

    .tobidu-ss-header,
    .tobidu-ss-qr-wrap,
    .tobidu-ss-reschedule-form,
    .tobidu-ss-confirm-wrap {
        padding: 14px 12px;
    }

    .tobidu-ss-confirm-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .tobidu-ss-confirm-yes,
    .tobidu-ss-confirm-no {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .tobidu-ss-reschedule-actions {
        flex-direction: column;
    }

    .tobidu-ss-reschedule-submit,
    .tobidu-ss-reschedule-abort {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .tobidu-ss-slots-list {
        grid-template-columns: 1fr;
    }

    .tobidu-ss-row dt {
        min-width: 80px;
    }
}

/* =============================================================================
   Umbuchung erfolgreich
   ============================================================================= */

.tobidu-ss-reschedule-done {
    margin-top: 14px;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-left: 4px solid #1d4ed8;
    border-radius: 6px;
    padding: 14px 16px;
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.5;
}
