/* Ausgelagert aus src/layout/login-widget.php – wird per rf_asset() eingebunden und vom Browser zwischengespeichert. */
    /* Backdrop Overlay */
    .login-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 9998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .login-drawer-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Drawer Panel */
    .login-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 440px;
        background: var(--surface);
        border-left: 1px solid var(--line);
        box-shadow: none; /* Schatten nur geöffnet – sonst ragt er geschlossen ins Bild */
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
    }
    .login-drawer.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    /* Header */
    .drawer-header {
        padding: 30px 30px 10px;
        position: relative;
    }
    .drawer-close-btn {
        position: absolute;
        top: 24px;
        right: 24px;
        background: var(--surface-2);
        border: 1px solid var(--line-strong); /* Nutzt die kontrastreichere Rahmen-Variable */
        color: var(--text-2);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
        z-index: 10;
    }
    .drawer-close-btn:hover {
        background: var(--line);
        border-color: var(--text-3);
        color: var(--text);
        transform: scale(1.05);
    }
    .drawer-close-btn svg {
        display: block;
        width: 14px;
        height: 14px;
    }
    .drawer-logo-container {
        text-align: center;
        margin-top: 15px;
    }
    .drawer-logo {
        width: 56px;
        height: 56px;
        object-fit: contain;
        margin-bottom: 12px;
    }
    .drawer-title {
        font-size: 22px;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -0.02em;
        margin-bottom: 4px;
    }
    .drawer-subtitle {
        font-size: 13.5px;
        color: var(--text-3);
    }

    /* Scrollbarer Content-Bereich */
    .drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 10px 30px 30px;
    }

    /* Google Button */
    .widget-social-group {
        position: relative;
        width: 100%;
        margin-bottom: 16px;
    }
    .widget-openai-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        background-color: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: var(--r-sm);
        color: var(--text);
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        padding: 11px 16px;
        cursor: pointer;
        transition: background 0.25s, border-color 0.25s;
    }
    .widget-openai-btn:hover {
        background-color: var(--green-soft);
        border-color: var(--green-bright);
    }
    .widget-openai-btn svg {
        width: 18px;
        height: 18px;
        margin-right: 10px;
        flex-shrink: 0;
    }
    .widget-g-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
        opacity: 0.0001;
        overflow: hidden;
        pointer-events: auto;
    }
    .widget-g-overlay iframe {
        width: 100% !important;
        height: 100% !important;
        transform: scale(1.5);
        transform-origin: center center;
    }

    /* Divider */
    .widget-divider {
        display: flex;
        align-items: center;
        text-align: center;
        color: var(--text-3);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.05em;
        margin: 20px 0;
    }
    .widget-divider::before,
    .widget-divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid var(--line);
    }
    .widget-divider:not(:empty)::before { margin-right: 12px; }
    .widget-divider:not(:empty)::after { margin-left: 12px; }

    /* Form Fields */
    .widget-form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .widget-field-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .widget-field-group label {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--text-2);
    }
    .widget-field-group input[type="email"],
    .widget-field-group input[type="password"] {
        background: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: var(--r-sm);
        padding: 11px 14px;
        font-family: inherit;
        font-size: 14px;
        color: var(--text);
        outline: none;
        transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
        width: 100%;
        box-sizing: border-box;
    }
    .widget-field-group input:focus {
        border-color: var(--green-bright);
        background: var(--surface);
        box-shadow: 0 0 0 4px var(--green-soft);
    }
    .widget-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .widget-link {
        font-size: 12px;
        font-weight: 600;
        color: var(--green-bright);
        text-decoration: none;
    }
    .widget-link:hover {
        text-decoration: underline;
    }

    /* Password Input Wrapper */
    .widget-password-container {
        position: relative;
        width: 100%;
    }
    .widget-password-toggle {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--text-3);
        cursor: pointer;
        font-size: 13px;
        transition: color 0.2s;
    }
    .widget-password-toggle:hover {
        color: var(--text-2);
    }

    /* Checkbox */
    .widget-checkbox-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .widget-checkbox-group input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--green-bright);
        cursor: pointer;
    }
    .widget-checkbox-group label {
        font-size: 13px;
        color: var(--text-2);
        cursor: pointer;
        user-select: none;
    }

    /* Submit Button */
    .widget-submit-btn {
        background: var(--grad);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        padding: 12px 20px;
        border-radius: var(--r-sm);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 14px rgba(46, 164, 111, 0.2);
        transition: transform 0.2s, box-shadow 0.2s;
        width: 100%;
        box-sizing: border-box;
    }
    .widget-submit-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(46, 164, 111, 0.3);
    }
    .widget-submit-btn:disabled {
        opacity: 0.8;
        cursor: not-allowed;
    }

    /* reCAPTCHA Styling */
    .widget-recaptcha-box {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 10px;
        background: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: var(--r-sm);
        box-sizing: border-box;
    }

    /* Consent Banner */
    .widget-consent-alert {
        background: rgba(37, 99, 235, 0.08);
        border: 1px solid rgba(37, 99, 235, 0.15);
        color: #2563eb;
        padding: 12px 14px;
        border-radius: var(--r-sm);
        font-size: 12.5px;
        line-height: 1.5;
        margin-top: 16px;
    }
    .widget-consent-alert p {
        margin: 0 0 8px 0;
    }
    .widget-consent-btn {
        border: 1px solid rgba(37, 99, 235, 0.3);
        color: #2563eb;
        background: transparent;
        font-weight: 700;
        font-size: 11.5px;
        cursor: pointer;
        padding: 5px 10px;
        border-radius: 6px;
        transition: all 0.2s;
    }
    .widget-consent-btn:hover {
        background: rgba(37, 99, 235, 0.12);
        border-color: #2563eb;
    }

    /* Footer */
    .drawer-footer {
        padding: 20px 30px 24px;
        border-top: 1px solid var(--line);
        background: var(--surface);
        text-align: center;
    }
    .drawer-footer p {
        font-size: 13px;
        color: var(--text-3);
        margin: 0;
    }
    .widget-link-strong {
        color: var(--green-bright);
        font-weight: 700;
        text-decoration: none;
    }
    .widget-link-strong:hover {
        text-decoration: underline;
    }

    /* Feedback Messages */
    .widget-message {
        padding: 11px 14px;
        border-radius: var(--r-sm);
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .widget-message.success {
        background: var(--green-soft);
        color: var(--green-bright);
        border: 1px solid rgba(46, 164, 111, 0.2);
    }
    .widget-message.error {
        background: rgba(214, 69, 69, 0.08);
        color: var(--red);
        border: 1px solid rgba(214, 69, 69, 0.2);
    }

    /* Responsive Mobile Overrides */
    @media (max-width: 480px) {
        .login-drawer {
            max-width: 100%;
            border-left: none;
        }
        .drawer-header {
            padding: 24px 20px 8px;
        }
        .drawer-body {
            padding: 8px 20px 24px;
        }
        .drawer-footer {
            padding: 16px 20px 20px;
        }
        .widget-field-group input {
            font-size: 16px !important;
        }
        .widget-recaptcha-box {
            padding: 8px 2px;
            overflow: hidden;
        }
        .widget-recaptcha-box .g-recaptcha {
            transform: scale(0.85);
            transform-origin: center center;
        }
    }
