/*
 * dialog-login.css
 *
 * Styles for the login panel and authentication UI
 */

/* -------------------------------------------------------
   Hide header logo during login — the panel has its own
------------------------------------------------------- */

.container:not(.main-active) .title-container {
    display: none;
}

/* -------------------------------------------------------
   Login Panel wrapper
------------------------------------------------------- */

/* #loginPanel is the positioning context for the lang bar so it can
   reach into the .container padding area (25px) to match the splashscreen's
   top: 16px / right: 20px from the container's outer edge */
#loginPanel {
    width: 100%;
    position: relative;
}

.login-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 0 32px;
    box-sizing: border-box;
}

/* -------------------------------------------------------
   Language bar — pinned top-right
------------------------------------------------------- */

/* Offsets compensate for .container's 25px padding:
   top: 16px - 25px = -9px, right: 20px - 25px = -5px
   Result: bar sits at 16px from container top, 20px from container right — same as splashscreen */
.login-lang-bar {
    position: absolute;
    top: -9px;
    right: -5px;
    z-index: 1; /* paint above .login-panel (position:relative, later in DOM) */
}

/* -------------------------------------------------------
   Logo — icon + wordmark
------------------------------------------------------- */

.login-logo {
    display: flex;
    justify-content: center;
    margin-top: 40px; /* clear the lang button */
    margin-bottom: 26px;
}

.login-logo-title-graphic {
    height: 96px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* -------------------------------------------------------
   Title + Subtitle
------------------------------------------------------- */

.login-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    margin-bottom: 6px;
    font-family: 'Sora', sans-serif;
}

.login-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    margin-bottom: 28px;
    font-family: 'Inter', sans-serif;
}

/* -------------------------------------------------------
   Form layout
------------------------------------------------------- */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* -------------------------------------------------------
   Inputs (email + password)
------------------------------------------------------- */

.login-input {
    width: 100%;
    height: 48px;                        /* fixed height matches widget-password lock */
    padding: 14px 16px;                  /* all 4 sides explicit */
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    outline: none;
}

.login-input:focus {
    border-color: rgba(45, 212, 191, 0.5);
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

/* Override browser autofill background */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px #2a2a35 inset !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
    caret-color: white;
}

/* -------------------------------------------------------
   Forgot password row
------------------------------------------------------- */

.login-forgot-row {
    text-align: right;
    margin-top: -4px;
}

.login-forgot-link {
    background: none;
    border: none;
    color: #2dd4bf;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.login-forgot-link:hover {
    color: #3de0cb;
}

/* -------------------------------------------------------
   Status / error message
------------------------------------------------------- */

.login-message {
    min-height: 20px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-message.error {
    background: rgba(211, 47, 47, 0.2);
    color: #ff7070;
    border: 1px solid rgba(211, 47, 47, 0.4);
    opacity: 1;
}

.login-message.success {
    background: rgba(45, 212, 191, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.3);
    opacity: 1;
}

/* -------------------------------------------------------
   Sign In button — full-width teal bevel
------------------------------------------------------- */

.login-signin-button {
    width: 100%;
    padding: 16px;
    background: #2dd4bf;
    border-top: 3px solid #5ef0de;
    border-bottom: 3px solid #0f8a7a;
    border-left: none;
    border-right: none;
    border-radius: 0;
    color: #0a2218;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    transition: background 0.15s ease, border-color 0.1s ease, transform 0.1s ease;
}

.login-signin-button:hover {
    background: #3de0cb;
    border-top-color: #72f4e6;
    border-bottom-color: #1aaa8e;
}

.login-signin-button:active {
    background: #25b8a4;
    border-top-color: #0f8a7a;
    border-bottom-color: #5ef0de;
    transform: translateY(1px);
}

.login-signin-button.ghosted {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* -------------------------------------------------------
   OR divider
------------------------------------------------------- */

.login-or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-or-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.login-or-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* -------------------------------------------------------
   Social login buttons — dark bevel
------------------------------------------------------- */

.login-social-button {
    width: 100%;
    padding: 14px;
    background: #3a3a3a;
    border-top: 3px solid #606060;
    border-bottom: 3px solid #181818;
    border-left: none;
    border-right: none;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s ease, border-color 0.1s ease, transform 0.1s ease;
}

.login-social-button:hover {
    background: #484848;
    border-top-color: #787878;
    border-bottom-color: #202020;
    color: rgba(255, 255, 255, 1);
}

.login-social-button:active {
    background: #2e2e2e;
    border-top-color: #181818;
    border-bottom-color: #606060;
    transform: translateY(1px);
}

/* -------------------------------------------------------
   Create account row
------------------------------------------------------- */

.login-create-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.login-create-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.38);
}

.login-create-link {
    background: none;
    border: none;
    color: #2dd4bf;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-create-arrow {
    width: 20px;
    height: 10px;
    flex-shrink: 0;
    /* Nudge down slightly so the arrow stem aligns with the text cap-height midpoint */
    position: relative;
    top: 1px;
}

.login-create-link:hover {
    color: #3de0cb;
}

/* -------------------------------------------------------
   Mobile
------------------------------------------------------- */

@media (max-width: 600px) {
    .login-panel {
        padding: 20px 20px 32px;
    }

    /* Pin lang bar to the viewport corner like the splashscreen dialog does in mobile */
    .login-lang-bar {
        position: fixed;
        top: 16px;
        right: 20px;
    }
}
