/* ==========================================================================
   OAUTH POPUP & FULL-PAGE RESPONSIVE CONTAINER
   Compact popup-first layout with smooth transitions
   ========================================================================== */

/* Main Full Window / Shell */
.oauth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: radial-gradient(circle at 50% 10%, rgba(var(--oauth-primary-rgb), 0.08) 0%, transparent 60%),
                var(--oauth-bg-body);
}

/* Standalone Authorization Card (The Popup Window Viewport) */
.oauth-card {
    width: 100%;
    max-width: var(--oauth-popup-width);
    background: var(--oauth-bg-surface);
    border: 1px solid var(--oauth-border);
    border-radius: var(--oauth-radius-lg);
    box-shadow: var(--oauth-shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: oauthPopupEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* In pure native popup mode (where window is already 480x640) */
body.in-popup-window {
    background: var(--oauth-bg-surface);
    overflow-x: hidden;
}

body.in-popup-window .oauth-shell {
    padding: 0;
    min-height: 100vh;
    align-items: stretch;
}

body.in-popup-window .oauth-card {
    max-width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    min-height: 100vh;
}

/* Header Bar */
.oauth-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--oauth-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.oauth-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.oauth-header-logo {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oauth-header-logo svg {
    width: 100%;
    height: 100%;
}

.oauth-header-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--oauth-text-primary);
    letter-spacing: -0.01em;
}

.oauth-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--oauth-text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: var(--oauth-radius-full);
    border: 1px solid var(--oauth-border);
}

.oauth-security-badge.secure {
    color: var(--oauth-primary);
    border-color: rgba(var(--oauth-primary-rgb), 0.3);
    background: rgba(var(--oauth-primary-rgb), 0.08);
}

/* Card Body / Wizard Step Viewport */
.oauth-body {
    padding: 24px 24px 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Wizard Footer Controls */
.oauth-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--oauth-border);
    background: rgba(17, 24, 39, 0.7);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oauth-footer-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.oauth-footer-disclaimer {
    font-size: 11px;
    color: var(--oauth-text-tertiary);
    text-align: center;
    line-height: 1.4;
}

.oauth-footer-disclaimer a {
    color: var(--oauth-text-secondary);
    text-decoration: underline;
    transition: color 0.2s;
}

.oauth-footer-disclaimer a:hover {
    color: var(--oauth-primary);
}

/* Entrance Keyframes */
@keyframes oauthPopupEntrance {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Small Screen */
@media (max-width: 520px) {
    .oauth-shell {
        padding: 0;
    }
    .oauth-card {
        max-width: 100%;
        border-radius: 0;
        border: none;
        min-height: 100vh;
    }
    .oauth-body {
        padding: 20px 16px;
    }
    .oauth-footer {
        padding: 14px 16px;
    }
}
