/* RoomPortal login styles */
@import url("../../rp/global.css");

/* Variables & Reset */
:root {
    --indigo-600: #4f46e5;
    --slate-900: #0f172a;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --amber-500: #f59e0b;
}

* {
    box-sizing: border-box;
}

.portal-body {
    margin: 0;
    background-color: #e5e7eb;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Background Blobs */
.bg-container {
    position: fixed;
    inset: 0;
    z-index: -10;
    background-color: #e5e7eb;
}

.bg-blob {
    position: absolute;
    width: 50%;
    height: 50%;
    filter: blur(80px);
    border-radius: 9999px;
    opacity: 0.6;
    animation: pulse-slow 8s infinite alternate;
}

.blob-top {
    top: -5%;
    left: -5%;
    background-color: rgba(129, 140, 248, 0.3);
}

.blob-bottom {
    bottom: -5%;
    right: -5%;
    background-color: rgba(252, 211, 77, 0.3);
}

@keyframes pulse-slow {
    from { transform: scale(1); opacity: 0.4; }
    to { transform: scale(1.1); opacity: 0.7; }
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--slate-900);
    margin: 0;
}

.logo-text .highlight {
    color: var(--amber-500);
}

.brand-logo-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.brand-logo {
    width: 7.5rem; /* w-30 (Tailwind 4) */
    height: 7.5rem;
    object-fit: contain;
}

/* Card Styling */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.glass-card {
    width: 100%;
    max-width: 32rem; /* max-w-lg */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 3rem;
    padding: 2.5rem; /* Mobile padding */
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease;
}

.glass-card:hover {
    transform: scale(1.01);
}

.card-header {
    margin-bottom: 3rem;
}

.welcome-title {
    font-size: 2.25rem; /* text-4xl mobile */
    font-weight: 900;
    color: var(--slate-900);
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--slate-500);
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
}

/* Form Elements */
.form-container {
    display: flex;
    flex-direction: column;
}

.guest-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.input-group {
    width: 100%;
}

.code-input {
    width: 100%;
    height: 6rem;
    border-radius: 1.5rem;
    border: 2px solid var(--slate-200);
    background-color: #f8fafc; /* bg-slate-50 */
    font-size: 2.25rem; /* text-4xl */
    text-align: center;
    color: var(--slate-900);
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.code-input:focus {
    border-color: var(--indigo-600);
    background-color: white;
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.05); /* ring-8 */
}

.submit-btn {
    width: 100%;
    height: 5rem;
    background-color: var(--indigo-600);
    color: white;
    font-size: 1.25rem;
    font-weight: 900;
    border: none;
    border-radius: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 20px 25px -5px rgba(199, 210, 254, 0.5); /* shadow-indigo-200 */
}

.submit-btn:hover {
    background-color: var(--slate-900);
}

.submit-btn:active {
    transform: scale(0.95);
}

.arrow-icon {
    transition: transform 0.2s ease;
}

.submit-btn:hover .arrow-icon {
    transform: translateX(0.5rem);
}

/* Error Banner */
.error-banner {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* Footer Decor */
.footer-divider {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0.4;
}

.line {
    height: 1px;
    width: 3rem;
    background-color: var(--slate-400);
}

.secure-text {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--slate-500);
    margin: 0;
}

/* Screen Reader Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Small phones */
@media (max-width: 639px) {
    .login-wrapper {
        padding: 1rem;
    }

    .glass-card {
        padding: 1.75rem 1.25rem;
        border-radius: 1.75rem;
    }

    .code-input {
        font-size: 1.75rem;
        height: 4.5rem;
    }

    .submit-btn {
        height: 3.5rem;
        font-size: 1.125rem;
    }

    .welcome-title {
        font-size: 2rem;
    }
}

/* Responsive Breakpoints (Medium Screens) */
@media (min-width: 768px) {
    .logo-text {
        font-size: 1.875rem; /* text-3xl */
    }
    
    .glass-card {
        padding: 3.5rem; /* p-14 */
    }

    .welcome-title {
        font-size: 3rem; /* text-5xl */
    }
}