/* Reset & Grundstil */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f2efea;
    color: #14171a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #f3efea, #f8f6f1);
    color: #ffffff;
    padding: 0.5rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

/* Logo-Gruppe: DZB + optionales Partnerlogo – nebeneinander */
.logo-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

/* Beauty-Partner-Logo (standardmäßig hidden) */
.beauty-logo {
    height: 54px; /* Gleiche Höhe wie DZB-Logo im Beauty-Modus */
    width: auto;
    max-width: 180px;
}

/* Trennstrich zwischen DZB- und Beauty-Logo */
[data-tenant="beauty"] .beauty-logo {
    border-left: 1px solid #d0d7e2;
    padding-left: 1rem;
}

/* Wenn Beauty-Tenant aktiv: DZB-Logo kleiner */
[data-tenant="beauty"] #dzb-logo {
    width: 120px;
    height: 54px;
}

.site-header h1 {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* Anweisungen */
.instructions {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
    display: flex;
    gap: 2rem;
}

.instructions ol {
    padding-left: 1.8rem;
    color: #333;
}

.instructions li {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    position: relative;
    padding-left: 1.5rem;
}

.instructions li:before {
    content: "•";
    color: #002d5c;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.instructions-left {
    flex: 1;
}

.instructions-left ul {
    list-style: none;
}

.instructions-left h3 {
    margin-bottom: 1rem;
    color: #002d5c;
    font-size: 1.2rem;
}

.instructions-left ul li {
    color: #14171a;
    font-size: 1rem;
}

.instructions-right {
    flex: 1;
    border-left: 1px solid #e1e8ed;
    padding-left: 2rem;
}

.instructions-right h3 {
    margin-bottom: 1rem;
    color: #002d5c;
    font-size: 1.2rem;
}

.instructions-right ul {
    list-style: none;
    padding: 0;
}

.instructions-right li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    position: relative;
    padding-left: 1.5rem;
}

.instructions-right li:before {
    content: "✓";
    color: #002d5c;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

@media (max-width: 768px) {
    .instructions {
        flex-direction: column;
        gap: 1rem;
    }

    .instructions-right {
        border-left: none;
        border-top: 1px solid #e1e8ed;
        padding-left: 0;
        padding-top: 1rem;
    }
}

/* Hinweisbox */
.disclaimer {
    background-color: #f8f9fa;
    color: #495057;
    padding: 1.5rem;
    font-weight: 500;
    border-left: 4px solid #002d5c;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    font-size: 1.05rem;
}

.upload-container {
    padding: 4rem;
    text-align: center;
    background-color: #ffffff;
    border: 2px dashed #002d5c;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin: 2rem 0;
}

.upload-container:hover {
    background-color: #f8f9fa;
    border-color: #002d5c;
    box-shadow: 0 6px 16px rgba(0, 45, 92, 0.1);
}

.upload-container.dragover {
    background-color: #e3f2fd;
    border-style: solid;
    border-width: 3px;
}

#output-header {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: #14171a;
    font-weight: 500;
}

span.xml-val {
    color: #002d5c;
    font-weight: 600;
}

#output-header span {
    font-weight: 600;
    color: #002d5c;
}

#status-output {
    margin-top: 2rem;
}

#loading {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e1e8ed;
    color: #495057;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* ERROR OUTPUT - FIXED! */
#error-output {
    padding: 1.5rem;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#error-output h3 {
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#error-output p {
    margin: 0.5rem 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* WARNING OUTPUT - Gelber Hinweis-Kasten */
#warning-output {
    padding: 1.5rem;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#warning-output h3 {
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#warning-output p {
    margin: 0.5rem 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

#success-output {
    padding: 1.5rem;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.bank-description {
    font-style: italic;
    color: #6c757d;
    font-size: 0.95rem;
}

.hidden {
    display: none !important;
}

/* Button Style */
.btn-primary {
    background-color: #002d5c;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition:
        background-color 0.3s ease,
        transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(0, 45, 92, 0.2);
}

.btn-primary:hover {
    background-color: #00244a;
    transform: translateY(-1px);
}

.btn-primary:active {
    background-color: #001d3d;
    transform: translateY(0);
}

#bt-table {
    border-collapse: collapse;
    background-color: #ffffff;
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#bt-table th,
#bt-table td {
    border: 1px solid #e1e8ed;
    height: 48px;
    min-width: 200px;
    padding: 12px;
    font-size: 0.95rem;
}

#bt-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #002d5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#bt-table tr:hover {
    background-color: #f8f9fa;
}

#bt-table tr.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* VALIDIERUNGSPROZESS */
:root {
    --primary-color: #002d5c;
    --success-color: #28a745;
    --error-color: #dc3545;
    --pending-color: #6c757d;
    --active-color: #002d5c;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --border-color: #e1e8ed;
    --text-color-dark: #14171a;
    --text-color-light: #6c757d;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
}

.validation-process {
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

h1 {
    text-align: center;
    color: var(--active-color);
    margin-bottom: 3rem;
    font-weight: 600;
    font-size: 2rem;
}

.validation-stepper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    position: relative;
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease-in-out;
    border-left: 4px solid transparent;
}

.step-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1.5rem;
    border: 2px solid var(--pending-color);
    transition: all 0.3s ease-in-out;
    position: relative;
    z-index: 2;
    background-color: var(--card-background);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.step-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    display: none;
    color: currentColor;
}

/* Status: pending */
.step[data-status="pending"] .step-icon {
    border-color: var(--pending-color);
    color: var(--pending-color);
}

.step[data-status="pending"] .icon-pending {
    display: block;
}

.step[data-status="pending"] .step-message {
    color: var(--text-color-light);
}

/* Status: active */
.step[data-status="active"] {
    background-color: #e3f2fd;
    border-left: 5px solid var(--active-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow-medium);
}

.step[data-status="active"] .step-icon {
    border-color: var(--active-color);
    color: var(--active-color);
    animation: pulse 1s infinite alternate;
}

.step[data-status="active"] .icon-pending {
    display: block;
}

.step[data-status="active"] .step-title {
    color: var(--active-color);
    font-weight: 700;
}

.step[data-status="active"] .step-message {
    color: var(--text-color-dark);
    font-weight: 500;
}

/* Status: success - GRÜN! */
.step[data-status="success"] {
    background-color: #d4edda;
    border-left: 5px solid var(--success-color);
}

.step[data-status="success"] .step-icon {
    border-color: var(--success-color);
    background-color: var(--success-color);
    color: var(--card-background);
}

.step[data-status="success"] .icon-success {
    display: block;
}

.step[data-status="success"] .step-title {
    color: var(--success-color);
    font-weight: 700;
}

.step[data-status="success"] .step-message {
    color: var(--text-color-dark);
}

/* Status: error */
.step[data-status="error"] {
    background-color: #f8d7da;
    border-left: 5px solid var(--error-color);
}

.step[data-status="error"] .step-icon {
    border-color: var(--error-color);
    background-color: var(--error-color);
    color: var(--card-background);
}

.step[data-status="error"] .icon-error {
    display: block;
}

.step[data-status="error"] .step-title {
    color: var(--error-color);
    font-weight: 700;
}

.step[data-status="error"] .step-message {
    color: var(--error-color);
    font-weight: 500;
}

.step-content {
    flex-grow: 1;
    position: relative;
}

.step-title {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color-dark);
    transition: color 0.3s ease;
}

.step-message {
    font-size: 1em;
    color: var(--text-color-light);
    transition: color 0.3s ease;
}

/* Success Badge für Schritt 4 */
.success-badge {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    animation: confetti-bounce 0.6s ease-out;
}

/* Info Badge für Schritt 4 bei teilweisem Erfolg */
.info-badge {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #002d5c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 45, 92, 0.3);
    animation: confetti-bounce 0.6s ease-out;
}

@keyframes confetti-bounce {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 45, 92, 0.4);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 45, 92, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }
    .step {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
    }
    .step-icon {
        width: 28px;
        height: 28px;
        margin-right: 1rem;
    }
    .step-icon svg {
        width: 16px;
        height: 16px;
    }
    .step-title {
        font-size: 1em;
    }
    .step-message {
        font-size: 0.9em;
    }
    .success-badge {
        position: static;
        transform: none;
        margin-top: 1rem;
        display: inline-block;
    }

    .info-badge {
        position: static;
        transform: none;
        margin-top: 1rem;
        display: inline-block;
    }
}

/* Redesign BT Ausgabe */

#bt-details {
    background-color: #ffffff;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e1e8ed;
}

.main-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid #e1e8ed;
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background-color 0.2s ease;
}

.main-row:hover {
    background-color: #f8f9fa;
}

.bt-number {
    flex: 1 !important;
}

.data-cell {
    flex: 4;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.main-row.error {
    background-color: #f8d7da !important;
}

.main-row.error .value .cell-title {
    color: var(--error-color) !important;
}

.main-row.warning {
    background-color: #fff3cd !important;
}

.main-row.warning .value .cell-title {
    color: #856404 !important;
}

.data-cell:not(:last-child) {
    border-right: 1px solid #e1e8ed;
}

.cell-title {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.cell-content {
    font-size: 16px;
    color: #14171a;
    font-weight: 600;
}

.details-row {
    padding: 1.5rem;
    background-color: #f8fafb;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    border-top: 1px solid #e1e8ed;
}

.details-row.is-open {
    max-height: fit-content;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.details-row p {
    margin: 0;
    font-size: 14px;
    color: #14171a;
    line-height: 1.6;
}

.details-row .hint-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-left: 4px solid #e0a800;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

.details-row .error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: #002d5c;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 22, 54, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Scrollbar wenn Inhalt Viewport überragt */
}

.modal-content {
    background-color: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    text-align: center;
    max-width: 720px;
    width: 90%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 45, 92, 0.08);
    border-top: 4px solid var(--primary-color);
}

.modal-icon {
    margin-bottom: 1.25rem;
}

.modal-icon svg {
    opacity: 0.85;
}

.modal-content h2 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.modal-content p {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
}

.modal-content button {
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
}

#accept-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 2.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 45, 92, 0.25);
}

#accept-btn:hover {
    background-color: #003d7a;
    box-shadow: 0 4px 16px rgba(0, 45, 92, 0.35);
}

#accept-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 45, 92, 0.3);
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #f3efea, #f8f6f1);
    padding: 0.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid #e1e8ed;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-link {
    color: #002d5c;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

.footer-link:hover {
    color: #00244a;
    text-decoration: underline;
}

.footer-separator {
    color: #6c757d;
    font-weight: 300;
}

@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-separator {
        display: none;
    }
}

/* ================================================================
   Modal – Mobile Anpassungen
   Auf kleinen Bildschirmen von oben scrollen statt zentrieren,
   damit der „Verstanden"-Button immer erreichbar ist.
================================================================ */
@media (max-width: 600px) {
    .modal {
        align-items: flex-start;
        padding: 1rem 0 2rem;
    }

    .modal-content {
        padding: 1.5rem 1.25rem;
        border-radius: 8px;
        width: 92%;
        margin: 0 auto;
    }

    .modal-icon svg {
        width: 36px;
        height: 36px;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    .modal-content p {
        font-size: 0.875rem;
        line-height: 1.6;
        text-align: left;
        margin-bottom: 1.5rem;
    }

    #accept-btn {
        width: 100%;
        padding: 0.85rem 1rem;
    }
}
