
/* =========================================
   BIRTHDAY STUDIO v2.0
   CREATOR LOGIN STYLESHEET
   Version: 1.0.0
========================================= */


/* =========================================
   1. LOGIN SCREEN LAYOUT
========================================= */

.login-screen {

    width: 100%;

    min-height: 100vh;
    min-height: 100dvh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
        calc(32px + env(safe-area-inset-top, 0px))
        20px
        calc(32px + env(safe-area-inset-bottom, 0px));

    background:
        radial-gradient(
            ellipse at 50% 0%,
            var(--accent-soft),
            transparent 65%
        ),
        var(--bg-primary);

    color: var(--text-primary);

    font-family: var(--font-family);

    box-sizing: border-box;

}


.login-container {

    width: 100%;

    max-width: 420px;

    margin: auto;

    animation:
        loginScreenAppear 450ms ease both;

}


/* =========================================
   2. BRAND HEADER
========================================= */

.login-brand {

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

    margin-bottom: 30px;

}


.login-brand-icon {

    width: 70px;

    height: 70px;

    display: grid;

    place-items: center;

    background: var(--accent-soft);

    border: 1px solid var(--border);

    border-radius: 22px;

    font-size: 34px;

    margin-bottom: 18px;

    box-shadow:
        0 8px 30px var(--accent-soft);

}


.login-brand h1 {

    margin: 0 0 8px;

    font-size: 28px;

    font-weight: 750;

    letter-spacing: -0.7px;

    line-height: 1.3;

    color: var(--text-primary);

}


.login-brand p {

    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.6;

}


/* =========================================
   3. LOGIN CARD
========================================= */

.login-card {

    width: 100%;

    padding: 28px;

    background: var(--bg-card);

    border: 1px solid var(--border);

    border-radius: var(--radius-xl);

    box-shadow: var(--shadow);

    box-sizing: border-box;

}


.login-heading {

    margin-bottom: 26px;

}


.login-heading h2 {

    margin: 0 0 8px;

    font-size: 23px;

    font-weight: 700;

    letter-spacing: -0.4px;

    color: var(--text-primary);

}


.login-heading p {

    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.6;

}


/* =========================================
   4. LOGIN FORM
========================================= */

.login-form {

    display: flex;

    flex-direction: column;

    gap: 20px;

}


.login-field {

    display: flex;

    flex-direction: column;

    gap: 9px;

}


.login-field label {

    font-size: 13px;

    font-weight: 600;

    color: var(--text-primary);

}


/* =========================================
   5. INPUT WRAPPER
========================================= */

.login-input-wrapper {

    display: flex;

    align-items: center;

    gap: 10px;

    min-height: 54px;

    padding: 0 13px;

    background: var(--bg-secondary);

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    transition:
        border-color var(--transition),
        box-shadow var(--transition);

}


.login-input-wrapper:focus-within {

    border-color: var(--accent);

    box-shadow:
        0 0 0 3px var(--accent-soft);

}


.login-input-wrapper:has(
    input[aria-invalid="true"]
) {

    border-color: var(--danger);

}


.login-field-icon {

    flex-shrink: 0;

    width: 20px;

    text-align: center;

    font-size: 17px;

    color: var(--text-muted);

    user-select: none;

}


/* =========================================
   6. INPUT ELEMENTS
========================================= */

.login-input-wrapper input {

    width: 100%;

    min-width: 0;

    min-height: 52px;

    flex: 1;

    padding: 0;

    border: none;

    outline: none;

    background: transparent;

    color: var(--text-primary);

    font-family: inherit;

    font-size: 16px;

    font-weight: 400;

    line-height: 1.5;

    appearance: none;

    -webkit-appearance: none;

}


.login-input-wrapper input::placeholder {

    color: var(--text-muted);

    opacity: 1;

}


.login-input-wrapper input:read-only {

    cursor: wait;

}


.login-input-wrapper input:-webkit-autofill {

    -webkit-text-fill-color:
        var(--text-primary);

    -webkit-box-shadow:
        0 0 0 1000px
        var(--bg-secondary) inset;

    caret-color: var(--text-primary);

}


/* =========================================
   7. PASSWORD VISIBILITY BUTTON
========================================= */

.login-password-toggle {

    width: 44px;

    height: 44px;

    display: grid;

    place-items: center;

    flex-shrink: 0;

    margin-right: -7px;

    padding: 0;

    border: none;

    border-radius: var(--radius-sm);

    background: transparent;

    color: var(--text-muted);

    cursor: pointer;

    transition:
        color var(--transition),
        background var(--transition);

}


.login-password-toggle:focus-visible {

    outline: 2px solid var(--accent);

    outline-offset: 2px;

}


.login-password-toggle:disabled {

    opacity: 0.45;

    cursor: not-allowed;

}


.login-eye-icon {

    display: flex;

    align-items: center;

    justify-content: center;

}


.login-eye-slash[hidden] {

    display: none !important;

}


/* =========================================
   8. LOGIN ERROR MESSAGE
========================================= */

.login-error {

    padding: 12px 14px;

    background: rgba(239, 114, 114, 0.10);

    border: 1px solid
        rgba(239, 114, 114, 0.30);

    border-radius: var(--radius-sm);

    color: var(--danger);

    font-size: 13px;

    line-height: 1.6;

    overflow-wrap: anywhere;

}


.login-error[hidden] {

    display: none !important;

}


/* =========================================
   9. PRIMARY LOGIN BUTTON
========================================= */

.login-submit-button {

    width: 100%;

    min-height: 52px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    padding: 14px 18px;

    border: none;

    border-radius: var(--radius-md);

    background: #7354cc;

    color: #ffffff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 600;

    line-height: 1.5;

    cursor: pointer;

    transition:
        background var(--transition),
        opacity var(--transition),
        transform var(--transition);

}


.login-submit-button:active:not(:disabled) {

    transform: scale(0.98);

}


.login-submit-button:focus-visible {

    outline: 2px solid var(--accent);

    outline-offset: 4px;

}


.login-submit-button:disabled {

    opacity: 0.7;

    cursor: wait;

}


#loginButtonArrow {

    font-size: 20px;

    line-height: 1;

}


/* =========================================
   10. LOGIN LOADING INDICATOR
========================================= */

.login-spinner {

    width: 18px;

    height: 18px;

    flex-shrink: 0;

    border: 2px solid
        rgba(255, 255, 255, 0.35);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation:
        loginSpinnerRotate 750ms linear infinite;

}


.login-spinner[hidden],

#loginButtonArrow[hidden] {

    display: none !important;

}


.login-status {

    min-height: 0;

    font-size: 12px;

    color: var(--text-secondary);

    line-height: 1.5;

    text-align: center;

}


.login-status:empty {

    display: none;

}


/* =========================================
   11. SECURITY NOTE
========================================= */

.login-security-note {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    margin-top: 22px;

    color: var(--text-secondary);

    font-size: 12px;

    line-height: 1.5;

    text-align: center;

}


.login-security-note span {

    color: var(--success);

    font-size: 15px;

}


/* =========================================
   12. FOOTER
========================================= */

.login-footer {

    margin-top: 25px;

    text-align: center;

    color: var(--text-muted);

}


.login-footer p {

    margin: 0 0 6px;

    font-size: 11px;

    line-height: 1.6;

}


.login-footer span {

    font-size: 11px;

    opacity: 0.85;

}


/* =========================================
   13. DESKTOP HOVER INTERACTIONS
========================================= */

@media (hover: hover) and (pointer: fine) {

    .login-submit-button:hover:not(:disabled) {

        background: #6245b8;

    }

    .login-password-toggle:hover:not(:disabled) {

        color: var(--text-primary);

        background: var(--bg-hover);

    }

}


/* =========================================
   14. ANIMATIONS
========================================= */

@keyframes loginScreenAppear {

    from {

        opacity: 0;

        transform: translateY(10px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}


@keyframes loginSpinnerRotate {

    from {

        transform: rotate(0deg);

    }

    to {

        transform: rotate(360deg);

    }

}


/* =========================================
   15. SMALL MOBILE DEVICES
========================================= */

@media (max-width: 380px) {

    .login-screen {

        padding-left: 15px;

        padding-right: 15px;

    }

    .login-card {

        padding: 22px 19px;

    }

    .login-brand h1 {

        font-size: 25px;

    }

    .login-brand-icon {

        width: 62px;

        height: 62px;

        font-size: 30px;

    }

    .login-heading h2 {

        font-size: 21px;

    }

    .login-brand {

        margin-bottom: 24px;

    }

}


/* =========================================
   16. SHORT VIEWPORTS / LANDSCAPE
========================================= */

@media (max-height: 700px) {

    .login-screen {

        align-items: flex-start;

    }

    .login-brand {

        margin-bottom: 20px;

    }

    .login-brand-icon {

        width: 56px;

        height: 56px;

        font-size: 28px;

        margin-bottom: 12px;

    }

    .login-footer {

        margin-top: 18px;

    }

}


/* =========================================
   17. ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    .login-container {

        animation: none;

    }

    .login-spinner {

        animation: none;

    }

    .login-submit-button,

    .login-password-toggle,

    .login-input-wrapper {

        transition: none;

    }

    .login-submit-button:active {

        transform: none;

    }

}
