/*
 * GPT theme: sign in, sign up and error pages. Standalone; shares nothing with the
 * dashboard auth layout.
 */

:root {
    color-scheme: dark;
    --ga-bg: #000000;
    --ga-text: #f3f3f3;
    --ga-text-2: #afafaf;
    --ga-text-3: #8f8f8f;
    --ga-field: #000000;
    --ga-line: #3a3a3a;
    --ga-line-strong: #8f8f8f;
    --ga-hover: #1a1a1a;
    --ga-solid: #ffffff;
    --ga-on-solid: #0d0d0d;
    --ga-link: #7ab7ff;
    --ga-danger: #ff6b66;
    --ga-danger-bg: rgba(224, 46, 42, .12);
    --ga-ok: #5fd39a;
    --ga-ok-bg: rgba(46, 166, 106, .12);
}

[data-theme-version="light"] {
    color-scheme: light;
    --ga-bg: #ffffff;
    --ga-text: #0d0d0d;
    --ga-text-2: #5d5d5d;
    --ga-text-3: #8f8f8f;
    --ga-field: #ffffff;
    --ga-line: #d9d9d9;
    --ga-line-strong: #5d5d5d;
    --ga-hover: #f4f4f4;
    --ga-solid: #0d0d0d;
    --ga-on-solid: #ffffff;
    --ga-link: #2964aa;
    --ga-danger: #c62320;
    --ga-danger-bg: rgba(224, 46, 42, .08);
    --ga-ok: #1e7f52;
    --ga-ok-bg: rgba(46, 166, 106, .1);
}

* {
    box-sizing: border-box;
}

body.gpt-auth {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--ga-bg);
    color: var(--ga-text);
    font-family: "Inter", ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
}

.gpt-auth a {
    color: var(--ga-link);
    text-decoration: none;
}

.gpt-auth a:hover {
    text-decoration: underline;
}

.ga-top {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 24px;
}

.ga-brand,
.gpt-auth a.ga-brand {
    display: inline-flex;
    align-items: center;
    color: var(--ga-text);
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

.ga-brand img {
    display: block;
    width: auto;
    max-height: 30px;
}

.ga-main {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 48px;
}

.ga-card {
    width: 100%;
    max-width: 360px;
}

.ga-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 500;
    line-height: 38px;
    letter-spacing: -.01em;
    text-align: center;
}

.ga-sub {
    margin: 0 0 28px;
    color: var(--ga-text-2);
    font-size: 15px;
    line-height: 22px;
    text-align: center;
}

.ga-alert {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--ga-danger-bg);
    color: var(--ga-danger);
    font-size: 13px;
    line-height: 18px;
}

.ga-alert.is-ok {
    background: var(--ga-ok-bg);
    color: var(--ga-ok);
}

.ga-alert ul {
    margin: 0;
    padding-left: 18px;
}

.ga-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ga-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Field with a label that floats above the value */
.ga-field {
    position: relative;
    display: block;
}

.ga-field input {
    width: 100%;
    height: 52px;
    padding: 18px 16px 4px;
    border: 1px solid var(--ga-line);
    border-radius: 26px;
    outline: none;
    background: var(--ga-field);
    color: var(--ga-text);
    font: inherit;
    font-size: 16px;
    transition: border-color .15s ease;
}

.ga-field input:hover {
    border-color: var(--ga-line-strong);
}

.ga-field input:focus {
    border-color: var(--ga-link);
    box-shadow: 0 0 0 1px var(--ga-link);
}

.ga-field.has-error input {
    border-color: var(--ga-danger);
}

.ga-field > span {
    position: absolute;
    top: 16px;
    left: 17px;
    color: var(--ga-text-2);
    font-size: 16px;
    line-height: 20px;
    pointer-events: none;
    transition: top .12s ease, font-size .12s ease;
}

.ga-field input:focus + span,
.ga-field input:not(:placeholder-shown) + span {
    top: 6px;
    font-size: 12px;
    line-height: 16px;
}

.ga-field input:focus + span {
    color: var(--ga-link);
}

.ga-field.has-toggle input {
    padding-right: 52px;
}

.ga-eye {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ga-text-2);
    cursor: pointer;
}

.ga-eye:hover {
    background: var(--ga-hover);
    color: var(--ga-text);
}

.ga-eye svg {
    width: 20px;
    height: 20px;
}

.ga-eye .ga-eye-off,
.ga-eye.is-on .ga-eye-on {
    display: none;
}

.ga-eye.is-on .ga-eye-off {
    display: block;
}

.ga-error {
    margin: -4px 0 0 16px;
    color: var(--ga-danger);
    font-size: 12.5px;
    line-height: 18px;
}

.ga-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px;
    font-size: 13.5px;
}

.ga-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ga-text-2);
    cursor: pointer;
}

.ga-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ga-solid);
}

.ga-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border: 1px solid var(--ga-line);
    border-radius: 26px;
    background: transparent;
    color: var(--ga-text);
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}

.gpt-auth a.ga-btn {
    color: var(--ga-text);
    text-decoration: none;
}

.ga-btn:hover {
    background: var(--ga-hover);
}

.ga-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.ga-btn-primary,
.gpt-auth a.ga-btn-primary {
    margin-top: 4px;
    border-color: var(--ga-solid);
    background: var(--ga-solid);
    color: var(--ga-on-solid);
    font-weight: 500;
}

.ga-btn-primary:hover {
    background: var(--ga-solid);
    opacity: .88;
}

.ga-btn:disabled {
    opacity: .6;
    cursor: default;
}

.ga-btn.is-busy::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ga-spin .7s linear infinite;
}

@keyframes ga-spin {
    to { transform: rotate(360deg); }
}

.ga-alt {
    margin: 20px 0 0;
    color: var(--ga-text);
    font-size: 15px;
    text-align: center;
}

.ga-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--ga-text-2);
    font-size: 13px;
    text-transform: uppercase;
}

.ga-divider::before,
.ga-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ga-line);
}

.ga-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ga-legal {
    margin: 24px 0 0;
    color: var(--ga-text-3);
    font-size: 12.5px;
    line-height: 18px;
    text-align: center;
}

.ga-foot {
    padding: 16px;
    color: var(--ga-text-3);
    font-size: 12.5px;
    text-align: center;
}

/* Error pages */
.ga-status {
    max-width: 440px;
    text-align: center;
}

.ga-code {
    margin: 0 0 12px;
    color: var(--ga-text-3);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .08em;
}

.ga-status h1 {
    font-size: 32px;
    line-height: 40px;
}

.ga-status .ga-sub {
    margin-bottom: 32px;
}

.ga-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.ga-actions .ga-btn,
.gpt-auth .ga-actions a.ga-btn {
    width: auto;
    height: 44px;
    margin: 0;
    font-size: 15px;
}

@media (max-width: 480px) {
    .ga-top {
        height: 56px;
        padding: 0 16px;
    }

    .ga-card h1 {
        font-size: 26px;
        line-height: 32px;
    }
}
