/* Auth-Modal auf der Startseite – ProjectPlayCore Design-System */

body.ppc-auth-modal-open {
    overflow: hidden;
}

.ppc-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.ppc-auth-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.ppc-auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.ppc-auth-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--ppc-app-surface, #141e28);
    border: 1px solid var(--ppc-app-panel-border, #243447);
    border-radius: var(--ppc-app-radius, 10px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.ppc-auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: var(--ppc-app-panel, #1a2838);
    color: var(--ppc-app-text, #e8eef4);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.ppc-auth-close:hover {
    background: #243447;
    color: var(--ppc-app-accent, #f97316);
}

.ppc-auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--ppc-app-panel-border, #243447);
    padding: 48px 16px 0;
    flex-shrink: 0;
}

.ppc-auth-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    color: var(--ppc-app-muted, #9aa8b8);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.ppc-auth-tab:hover {
    color: var(--ppc-app-text, #e8eef4);
}

.ppc-auth-tab.is-active {
    color: var(--ppc-app-accent, #f97316);
    border-bottom-color: var(--ppc-app-accent, #f97316);
}

.ppc-auth-panels {
    flex: 1;
    min-height: 0;
    position: relative;
}

.ppc-auth-panel {
    display: none;
    height: 100%;
    min-height: 380px;
}

.ppc-auth-panel.is-active {
    display: block;
}

.ppc-auth-panel iframe {
    width: 100%;
    height: min(72vh, 640px);
    min-height: 380px;
    border: 0;
    display: block;
    background: var(--ppc-app-bg, #0c1218);
}

/* Iframe-Inhalt (?modal=1) */
body.ppc-auth-modal-frame {
    margin: 0;
    min-height: 100%;
    background: var(--ppc-app-bg, #0c1218);
}

.ppc-auth-modal-frame-inner {
    padding: 12px;
    box-sizing: border-box;
    min-height: 100%;
}

.ppc-auth-modal-frame-inner .ppc-page-card {
    margin: 0;
}

@media (max-width: 480px) {
    .ppc-auth-dialog {
        max-height: 95vh;
    }
    .ppc-auth-panel iframe {
        min-height: 340px;
        height: 65vh;
    }
}

/* Startseite: Auth-Modal-Schicht über dem Seiteninhalt */
.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-modal-backdrop {
    background: rgba(5, 12, 22, 0.55);
    backdrop-filter: blur(10px) saturate(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

/* ─── Gast-Hub: äußere Tabs wie Holo (Echo/Messenger), weniger „Admin-Karte“ ─── */
.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2.75rem 1.35rem 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-tab {
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 180, 210, 0.72);
    border-bottom-width: 2px;
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-tab.is-active {
    color: rgba(186, 230, 253, 0.98);
    border-bottom-color: rgba(56, 189, 248, 0.65);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-tab:hover {
    color: rgba(226, 238, 248, 0.92);
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-close {
    border: 1px solid rgba(148, 180, 210, 0.12);
    color: rgba(226, 238, 248, 0.85);
    background: rgba(4, 10, 18, 0.45);
    backdrop-filter: blur(8px);
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-dialog {
    max-width: min(560px, calc(100vw - 2rem));
    border-radius: 14px;
    background: rgba(6, 12, 22, 0.45);
    backdrop-filter: blur(14px) saturate(1.08);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
    border: 1px solid rgba(148, 180, 210, 0.16);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.05),
        0 12px 40px rgba(0, 6, 16, 0.45);
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-close:hover {
    background: rgba(56, 189, 248, 0.14);
    color: rgba(255, 255, 255, 0.95);
}

.ppc-auth-modal.ppc-auth-modal--orbit-core .ppc-auth-panel iframe {
    background: transparent;
}

/* ─── Iframe-Inhalt (?modal=1): eine Ebene, kein zweites Karten-Innenfeld (Holo wie Orbit) ─── */
body.ppc-auth-modal-frame--embed.ppc-admin-body,
body.ppc-auth-modal-frame--embed.ppc-app-admin-body {
    background: transparent !important;
}

body.ppc-auth-modal-frame--embed {
    min-height: 100%;
}

body.ppc-auth-modal-frame--embed .ppc-auth-modal-frame-inner {
    padding: 1rem 1.15rem 1.25rem;
    box-sizing: border-box;
}

body.ppc-auth-modal-frame--embed .ppc-page-card,
body.ppc-auth-modal-frame--embed .ppc-user-card,
body.ppc-auth-modal-frame--embed .ppc-user-card--login {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

body.ppc-auth-modal-frame--embed .wp-welcome-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.ppc-auth-modal-frame--embed .wp-welcome-box h1 {
    font-size: clamp(1.22rem, 2.6vw, 1.48rem);
    font-weight: 750;
    line-height: 1.2;
    color: rgba(248, 250, 252, 0.98) !important;
    margin: 0 0 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    letter-spacing: -0.02em;
}

body.ppc-auth-modal-frame--embed .wp-form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 200, 230, 0.88) !important;
}

body.ppc-auth-modal-frame--embed .wp-muted {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
    color: rgba(186, 210, 230, 0.72) !important;
}

body.ppc-auth-modal-frame--embed .wp-form-input {
    background: rgba(4, 12, 22, 0.55) !important;
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    border-radius: 10px !important;
    color: rgba(241, 245, 249, 0.96) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.ppc-auth-modal-frame--embed .wp-form-input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 3px rgba(56, 189, 248, 0.12);
}

body.ppc-auth-modal-frame--embed .wp-button-primary,
body.ppc-auth-modal-frame--embed .wp-form-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.72rem 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #0b1016 !important;
    background: linear-gradient(160deg, #bae6fd 0%, #38bdf8 48%, #0ea5e9 100%) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 6px 22px rgba(0, 0, 0, 0.38);
}

body.ppc-auth-modal-frame--embed .wp-button-primary:hover,
body.ppc-auth-modal-frame--embed .wp-form-submit:hover {
    filter: brightness(1.05);
}

body.ppc-auth-modal-frame--embed .wp-message-error,
body.ppc-auth-modal-frame--embed .wp-message-info {
    border-radius: 10px !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    background: rgba(4, 12, 20, 0.65) !important;
}

body.ppc-auth-modal-frame--embed .wp-welcome-box p.wp-muted a {
    color: rgba(125, 211, 252, 0.95) !important;
    font-weight: 600;
    text-decoration: none;
}

body.ppc-auth-modal-frame--embed .wp-welcome-box p.wp-muted a:hover {
    text-decoration: underline;
}

body.ppc-auth-modal-frame--embed .wp-welcome-box > p:first-of-type {
    color: rgba(210, 222, 236, 0.9);
    line-height: 1.62;
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

body.ppc-auth-modal-frame--embed .wp-button-secondary {
    background: rgba(8, 12, 20, 0.65) !important;
    color: rgba(186, 230, 253, 0.95) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

body.ppc-auth-modal-frame--embed .wp-form-checkbox {
    accent-color: #38bdf8;
}

body.ppc-auth-modal-frame--embed .wp-form-group label:has(.wp-form-checkbox) {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.88rem;
    color: rgba(210, 222, 236, 0.88) !important;
}
