/**
 * Fotoalbum Helfer Pro - Commercial & SaaS Stylesheet
 * User Bar, Credit Store, Auth Modal, Start-Warning Modal, Legal & Admin
 */

/* User Header Bar */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.03);
}

.user-status-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-email-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
}

.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    background: #e9f6ef;
    border: 1px solid #b7e2cc;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.credit-badge .spark {
    color: var(--green);
    font-size: 13px;
}

.admin-link {
    font-size: 11px;
    font-weight: 700;
    color: #8c5d15;
    background: #fdf5e7;
    border: 1px solid #fae6c3;
    padding: 5px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all .16s ease;
}
.admin-link:hover {
    background: #f8e6c7;
    color: #633f07;
}

/* Auth & Store Modals */
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pay-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 20, 16, 0.72);
    backdrop-filter: blur(8px);
}

.pay-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pay-modal-dialog.wide {
    width: min(940px, 100%);
}

.pay-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfc;
}

.pay-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.pay-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(88vh - 80px);
}

/* Tab Switcher in Auth Modal */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: #eef3ef;
    padding: 4px;
    border-radius: 11px;
    margin-bottom: 22px;
}

.auth-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .16s ease;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: var(--green-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-2);
}

.auth-form input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    background: #ffffff;
    color: var(--ink);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31,118,84,.14);
}

.auth-error {
    padding: 10px 14px;
    background: var(--red-soft);
    border: 1px solid #f3c2c2;
    border-radius: 9px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
}

/* Store Pricing Cards Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.pkg-card {
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: all .18s ease;
    background: #ffffff;
    position: relative;
}

.pkg-card:hover {
    border-color: var(--green);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(31,118,84,.12);
}

.pkg-card.selected {
    border-color: var(--green);
    background: #f6fbf8;
    box-shadow: 0 0 0 3px rgba(31,118,84,.18);
}

.pkg-badge {
    position: absolute;
    top: -11px;
    right: 12px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef3ee;
    color: var(--ink-2);
}

.pkg-badge.recommended {
    background: var(--green);
    color: #ffffff;
}

.pkg-badge.best-value {
    background: #cf9b22;
    color: #ffffff;
}

.pkg-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.pkg-credits {
    font-size: 26px;
    font-weight: 800;
    color: var(--green-dark);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pkg-credits span {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
}

.pkg-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.pkg-per-photo {
    font-size: 11px;
    color: var(--ink-3);
}

.pkg-desc {
    font-size: 11px;
    color: var(--ink-2);
    line-height: 1.4;
    margin-top: 4px;
}

/* Store Legal Waiver Box */
.checkout-box {
    background: #fbfdfc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.waiver-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    color: var(--ink-2);
    line-height: 1.45;
}

.waiver-check input {
    margin-top: 2px;
    accent-color: var(--green);
}

.sim-checkout-btn,
.paypal-checkout-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: #0070ba;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .16s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 112, 186, .25);
}
.sim-checkout-btn:hover:not(:disabled) {
    background: #005ea6;
    box-shadow: 0 6px 18px rgba(0, 112, 186, .35);
    transform: translateY(-1px);
}
.sim-checkout-btn:disabled {
    background: #c5d4e0;
    color: #6c8294;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Start-Warning Modal (FENSTER NICHT SCHLIESSEN) */
.start-warning-dialog {
    width: min(640px, 100%);
    border-top: 6px solid #e08b1f;
}

.start-warning-header {
    background: #fdfaf4;
}

.start-warning-badge {
    display: inline-block;
    background: #f9ecc8;
    color: #925807;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.warning-huge-title {
    font-size: 22px;
    font-weight: 800;
    color: #8c4e04;
    letter-spacing: .02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-body-copy {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    margin-bottom: 16px;
}

.warning-bullet-box {
    background: #f9fbf9;
    border: 1px solid #dae7dc;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.warning-point {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.warning-point-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.warning-point-desc {
    font-size: 12px;
    line-height: 1.55;
    color: #475569;
    padding-left: 20px;
}

.warning-ai-note {
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.5;
    margin-bottom: 22px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #1f7654;
}

.warning-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Legal Pages Styling */
.legal-page {
    background: #f7f9f7;
    color: var(--ink);
    padding: 40px 0;
}
.legal-shell {
    max-width: 820px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 42px 48px;
    box-shadow: 0 12px 40px rgba(0,0,0,.04);
}
.legal-header { margin-bottom: 32px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 12px; font-weight: 700; color: var(--green); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.legal-header h1 { font-size: 26px; margin: 0 0 8px; }
.legal-meta { font-size: 12px; color: var(--ink-3); }
.legal-content section { margin-bottom: 28px; }
.legal-content h2 { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.legal-content p, .legal-content li { font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.legal-content ul { padding-left: 20px; margin: 8px 0; }
.legal-box { background: #f8faf8; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 12px 0; }
.highlight-box { background: #f3f9f5; border-color: #bfe0ce; }

/* Subfolder checkbox row */
.subfolder-check-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
}
.subfolder-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
}
.subfolder-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    cursor: pointer;
}

/* Notice banner for unprocessed images (e.g. child safety filter) */
.failed-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #92400e;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(245, 158, 11, .06);
}
.failed-notice-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.failed-notice strong {
    color: #78350f;
}

/* Footer contact */
.footer-contact {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--ink-2);
    font-weight: 500;
}
.footer-contact a {
    color: var(--green);
    text-decoration: none;
    font-weight: 700;
}
.footer-contact a:hover {
    text-decoration: underline;
}
.legal-footer { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--ink-3); }
.legal-footer a { color: var(--ink-2); text-decoration: none; margin: 0 6px; }
.legal-footer a:hover { color: var(--green); }

@media (max-width: 700px) {
    .user-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .user-status-area { justify-content: space-between; width: 100%; }
    .legal-shell { padding: 24px 20px; }
    .packages-grid { grid-template-columns: 1fr; }
}

/* Mobile Notice Banner */
.mobile-notice-banner {
    display: none;
    background: #fff8e6;
    border-bottom: 2px solid #ecc94b;
    padding: 14px 18px;
    color: #744210;
    position: relative;
    z-index: 999;
}
@media (max-width: 840px) {
    .mobile-notice-banner {
        display: block;
    }
}
.mobile-notice-banner.dismissed {
    display: none !important;
}
.mobile-notice-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.mobile-notice-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.mobile-notice-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
}
.mobile-notice-text strong {
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
    color: #5b3506;
}
.mobile-notice-text p {
    margin: 4px 0;
}
.mobile-notice-dismiss {
    flex-shrink: 0;
    padding: 6px 12px;
    background: #eed57c;
    border: 1px solid #d69e2e;
    color: #5b3506;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
    transition: background .15s ease;
}
.mobile-notice-dismiss:hover {
    background: #e2c058;
}

/* Card Status Labels */
.card-status-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}
.card-status-label.in-progress {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
    animation: pulseStatus 2s infinite ease-in-out;
}
.card-status-label.blocked {
    background: #fffaf0;
    color: #b7791f;
    border: 1px solid #feebc8;
}
@keyframes pulseStatus {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.album-card-badge.in-progress {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
    animation: pulseStatus 2s infinite ease-in-out;
}
.album-card-badge.failed {
    background: #fffaf0;
    color: #b7791f;
    border: 1px solid #feebc8;
}
.album-card-badge.failed-crop {
    background: #fff5f5 !important;
    color: #c53030 !important;
    border: 1px solid #fed7d7 !important;
    font-weight: 700;
}
.album-card.crop-failed {
    border: 2px dashed #e53e3e !important;
    background: rgba(229, 62, 62, 0.05);
}

/* User Invoices Table in Modal */
.invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}
.invoices-table th {
    background: #f8fafc;
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--ink-2);
    border-bottom: 2px solid var(--line);
}
.invoices-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.invoices-table tr:hover td {
    background: #fafbf9;
}
.invoice-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--green);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: opacity .15s;
}
.invoice-btn:hover {
    opacity: 0.9;
}

