/*
 * Payment page styles.
 * Ported verbatim from the legacy Zahlung.aspx inline <style> block so the rendered page is
 * pixel-identical. All selectors are "zp-" prefixed and self-contained — they do not interact
 * with site.css or Bootstrap.
 */

:root {
    --zp-background: #f9fafb;
    --zp-foreground: #1f2730;
    --zp-card: #ffffff;
    --zp-primary: #349d62;
    --zp-primary-fg: #fcfcfc;
    --zp-secondary: #eff2f5;
    --zp-muted-fg: #6b727a;
    --zp-accent: #e0f5e6;
    --zp-accent-fg: #1c5434;
    --zp-border: #e5e5e5;
    --zp-radius: 0.625rem;
}

.zp-page {
    background-color: var(--zp-background);
    padding: 2rem 1rem 3rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    color: var(--zp-foreground);
    min-height: 500px;
}

.zp-inner {
    max-width: 72rem;
    margin: 0 auto;
}

.zp-success-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-radius: calc(var(--zp-radius) * 1.4);
    border: 1px solid rgba(52,157,98,0.30);
    background-color: rgba(224,245,230,0.60);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

    .zp-success-banner svg {
        flex-shrink: 0;
        margin-top: 1px;
        color: var(--zp-primary);
    }

    .zp-success-banner p {
        margin: 0;
        line-height: 1.5;
    }

.zp-sb-title {
    font-weight: 600;
    color: var(--zp-foreground);
}

.zp-sb-sub {
    margin-top: 0.25rem !important;
    color: var(--zp-muted-fg);
}

.zp-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .zp-grid {
        grid-template-columns: minmax(0,1fr) 22rem;
    }
}

.zp-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.zp-card {
    background-color: var(--zp-card);
    border: 1px solid var(--zp-border);
    border-radius: calc(var(--zp-radius) * 1.8);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.12);
}

.zp-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--zp-border);
}

    .zp-card-header h2 {
        margin: 0;
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--zp-foreground);
    }

    .zp-card-header p {
        margin: 0.25rem 0 0;
        font-size: 0.875rem;
        line-height: 1.625;
        color: var(--zp-muted-fg);
    }

.zp-invoice-section {
    padding: 1.25rem 1.5rem 0;
}

.zp-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--zp-muted-fg);
}

.zp-invoice-row {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: calc(var(--zp-radius) * 1.4);
    border: 1px solid rgba(52,157,98,0.25);
    background-color: rgba(224,245,230,0.50);
    padding: 1rem;
}

.zp-invoice-row-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.zp-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
}

.zp-icon-circle-lg {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(52,157,98,0.10);
    color: var(--zp-primary);
}

.zp-icon-circle-md {
    width: 2.25rem;
    height: 2.25rem;
    background-color: rgba(52,157,98,0.10);
    color: var(--zp-primary);
}

.zp-invoice-row-label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--zp-foreground);
}

.zp-invoice-row-sub {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: var(--zp-muted-fg);
}

.zp-invoice-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--zp-foreground);
    white-space: nowrap;
    margin: 0;
}

.zp-payment-section {
    padding: 1.25rem 1.5rem;
}

    .zp-payment-section h3 {
        margin: 0 0 0.75rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--zp-foreground);
    }

.zp-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.zp-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--zp-radius);
    border: 1px solid var(--zp-border);
    background-color: var(--zp-card);
    color: var(--zp-muted-fg);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

    .zp-tab-btn:hover:not(.zp-tab-active) {
        background-color: var(--zp-secondary);
    }

    .zp-tab-btn.zp-tab-active {
        border-color: var(--zp-primary);
        background-color: var(--zp-accent);
        color: var(--zp-accent-fg);
    }

.zp-tab-panel {
    display: none;
    margin-top: 1.25rem;
}

    .zp-tab-panel.zp-active {
        display: block;
    }

.zp-sepa-desc {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--zp-muted-fg);
    line-height: 1.5;
}

.zp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.zp-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .zp-field label {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--zp-foreground);
    }

.zp-sepa-input {
    height: 2.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: var(--zp-radius) !important;
    border: 1px solid var(--zp-border) !important;
    background-color: var(--zp-background) !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    color: var(--zp-foreground) !important;
    outline: none !important;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .zp-sepa-input:focus {
        border-color: var(--zp-primary) !important;
        box-shadow: 0 0 0 3px rgba(52,157,98,0.20) !important;
    }

.zp-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem;
    width: 100% !important;
    margin-top: 0.25rem;
    border-radius: var(--zp-radius) !important;
    border: 1px solid transparent !important;
    background-color: var(--zp-primary) !important;
    color: var(--zp-primary-fg) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: opacity 0.15s;
    box-shadow: none !important;
}

    .zp-submit-btn:hover {
        opacity: 0.88;
        background-color: var(--zp-primary) !important;
    }

.zp-uw-box {
    border-radius: calc(var(--zp-radius)*1.4);
    border: 1px solid var(--zp-border);
    background-color: var(--zp-secondary);
    overflow: hidden;
}

.zp-uw-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--zp-border);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--zp-muted-fg);
}

    .zp-uw-header svg {
        color: var(--zp-primary);
    }

.zp-uw-rows {
    display: flex;
    flex-direction: column;
}

.zp-uw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--zp-border);
}

    .zp-uw-row:last-child {
        border-bottom: none;
    }

    .zp-uw-row dt {
        font-size: 0.8125rem;
        color: var(--zp-muted-fg);
        margin: 0;
    }

    .zp-uw-row dd {
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--zp-foreground);
        margin: 0;
        text-align: right;
        font-family: monospace;
    }

.zp-uw-note {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: var(--zp-muted-fg);
    line-height: 1.5;
}

.zp-trust-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    border-top: 1px solid var(--zp-border);
    background-color: rgba(239,242,245,0.40);
    padding: 1rem 1.5rem;
}

.zp-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--zp-muted-fg);
}

    .zp-trust-badge svg {
        color: var(--zp-primary);
    }

.zp-beleg-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--zp-border);
}

    .zp-beleg-header svg {
        color: var(--zp-primary);
    }

    .zp-beleg-header h2 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--zp-foreground);
    }

.zp-beleg-body {
    padding: 1.25rem 1.5rem;
}

.zp-dl {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.zp-dl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0;
    border-top: 1px solid var(--zp-border);
}

    .zp-dl-row:first-child {
        border-top: none;
    }

    .zp-dl-row dt {
        font-size: 0.875rem;
        color: var(--zp-muted-fg);
        margin: 0;
    }

    .zp-dl-row dd {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--zp-foreground);
        margin: 0;
        text-align: right;
    }

.zp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    background-color: var(--zp-accent);
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--zp-accent-fg);
}

.zp-status-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: var(--zp-primary);
    flex-shrink: 0;
    display: inline-block;
}

.zp-beleg-note {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    line-height: 1.625;
    color: var(--zp-muted-fg);
}

.zp-sidebar-card {
    background-color: var(--zp-card);
    border: 1px solid var(--zp-border);
    border-radius: calc(var(--zp-radius)*1.8);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

@media (min-width: 1024px) {
    .zp-sidebar-card {
        position: sticky;
        top: 1.5rem;
    }
}

.zp-sidebar-card h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--zp-foreground);
}

.zp-sidebar-card > p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    line-height: 1.625;
    color: var(--zp-muted-fg);
}

.zp-articles {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) and (max-width: 1023px) {
    .zp-articles {
        grid-template-columns: 1fr 1fr;
    }
}

.zp-article {
    border-radius: calc(var(--zp-radius)*1.4);
    border: 1px solid var(--zp-border);
    background-color: rgba(239,242,245,0.40);
    padding: 1rem;
}

.zp-article-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .zp-article-head h3 {
        margin: 0;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--zp-foreground);
    }

.zp-article p {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    line-height: 1.625;
    color: var(--zp-muted-fg);
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 1rem;
}

/* responsive (sm:flex-row) */
@media (min-width: 640px) {
    .qr-container {
        flex-direction: row;
    }

    .qr-text {
        text-align: left;
    }
}

.qr-box {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

    .qr-box img {
        width: 100%;
        height: 100%;
    }

.qr-text {
    text-align: left;
    flex: 1;
}

.qr-title {
    font-weight: 600;
    color: #111827;
    font-size: 18px;
    margin-bottom: 4px;
}

.qr-desc {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 12px;
}

.qr-note {
    font-size: 12px;
    color: #6b7280;
}

.zp-error-panel {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Already paid - hide invoice section */
.zp-already-paid .zp-invoice-section {
    display: none;
}

.zp-already-paid .zp-payment-section {
    display: none;
}

.zp-already-paid .zp-trust-footer {
    display: none;
}

/* ---- SEPA mandate consent + popup (legacy Zahlung.aspx zp-modal, :728-880) ---- */

.zp-sepa-confirmation {
    margin: 0.25rem 0 0.5rem 0;
}

.zp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--zp-foreground);
    line-height: 1.5;
    cursor: pointer;
}

.zp-mandate-checkbox {
    margin-top: 0.2rem;
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
    accent-color: var(--zp-primary);
    cursor: pointer;
}

.zp-mandate-link {
    color: var(--zp-primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

    .zp-mandate-link:hover {
        opacity: 0.85;
    }

.zp-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.zp-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.zp-modal-content {
    position: relative;
    max-width: 560px;
    margin: 8vh auto 0 auto;
    background: var(--zp-background);
    border: 1px solid var(--zp-border);
    border-radius: calc(var(--zp-radius)*1.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.zp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--zp-border);
}

    .zp-modal-header h2 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--zp-foreground);
    }

.zp-modal-close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--zp-muted-fg, #6b7280);
    cursor: pointer;
    padding: 0 0.25rem;
}

.zp-modal-body {
    padding: 1rem 1.25rem;
    max-height: 55vh;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--zp-foreground);
    line-height: 1.6;
}

    .zp-modal-body p {
        margin: 0 0 0.75rem 0;
    }

.zp-modal-footer {
    padding: 0.75rem 1.25rem 1.1rem 1.25rem;
    border-top: 1px solid var(--zp-border);
}

@media (max-width: 640px) {
    .zp-modal-content {
        max-width: none;
        margin: 4vh 0.75rem 0 0.75rem;
    }

    .zp-modal-body {
        max-height: 62vh;
    }
}
