/* =========================================================================
   GRO Login — Standalone page по Figma 7939-39537.
   2026-05-26 rev: full rewrite (split-screen 50/50, 6 states, 3 breakpoints).
   ========================================================================= */

/* ───── Base ───── */
body.gro-login-body {
    margin: 0;
    background: #ebeae3;
    font-family: "Golos Text", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #141414;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.gro-login {
    min-height: 100vh;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
}

.gro-login__container {
    flex: 1;
    background: #fff;
    border-radius: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    min-height: calc(100vh - 32px);
    position: relative;
}

/* ───── LEFT: arrow art + back ───── */
.gro-login__side {
    position: relative;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gro-login__logo {
    display: inline-block;
    text-decoration: none;
    color: #141414;
    z-index: 2;
}
.gro-login__logo img {
    display: block;
    height: 32px;
    width: auto;
}
.gro-login__logo-text {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-family: "Golos Text", sans-serif;
}

.gro-login__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    margin-top: 32px;
    align-self: flex-start;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 100px;
    color: #141414;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    z-index: 2;
}
.gro-login__back:hover {
    background: #fafaf7;
    border-color: rgba(0, 0, 0, 0.24);
}

.gro-login__arrow {
    position: absolute;
    left: 6%;
    bottom: 8%;
    width: 60%;
    max-width: 320px;
    pointer-events: none;
    z-index: 1;
}
.gro-login__arrow svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ───── RIGHT: form area ───── */
.gro-login__form-wrap {
    padding: 80px 96px 80px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.gro-login__panel {
    width: 100%;
}
.gro-login__panel[hidden] {
    display: none !important;
}

/* ───── Title ───── */
.gro-login__title {
    margin: 0 0 32px;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #141414;
}

/* ───── Form: input ───── */
.gro-login__field {
    margin-bottom: 28px;
}
.gro-login__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #888;
    font-weight: 400;
}
.gro-login__input {
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    font-size: 18px;
    font-weight: 500;
    color: #141414;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}
.gro-login__input::placeholder {
    color: #b8b8b8;
    font-weight: 400;
}
.gro-login__input:focus {
    border-bottom-color: #141414;
}
.gro-login__hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}
.gro-login__hint--error {
    color: #d33b3b;
    display: none;
}

/* Error state */
.gro-login[data-state="error"] .gro-login__hint--default { display: none; }
.gro-login[data-state="error"] .gro-login__hint--error { display: block; }
.gro-login[data-state="error"] .gro-login__input { border-bottom-color: #d33b3b; }

/* ───── Consents ───── */
.gro-login__consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}
.gro-login__check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}
.gro-login__check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.gro-login__check-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.24);
    border-radius: 5px;
    background: #fff;
    margin-top: 1px;
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
}
.gro-login__check input:checked + .gro-login__check-box {
    background: #D9B648;
    border-color: #D9B648;
}
.gro-login__check input:checked + .gro-login__check-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #141414;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.gro-login__check input:focus-visible + .gro-login__check-box {
    outline: 2px solid #D9B648;
    outline-offset: 2px;
}
.gro-login__check-label a {
    color: #141414;
    text-decoration: underline;
}

/* ───── Submit button ───── */
.gro-login__submit {
    width: 100%;
    padding: 16px 24px;
    background: #141414;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}
.gro-login__submit:hover:not(:disabled) {
    background: #000;
}
.gro-login__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide raw Magic Login Pro shortcode (используется как backend transport) */
.gro-login__magic-host {
    display: none !important;
}

/* ───── SENT state ───── */
.gro-login__sent-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 16px;
}
.gro-login__sent-head .gro-login__title {
    margin-bottom: 0;
}
.gro-login__envelope {
    flex-shrink: 0;
}
.gro-login__sent-text {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.5;
    color: #444;
}
.gro-login__sent-text strong {
    color: #141414;
    font-weight: 500;
}
.gro-login__sent-text--marketing {
    color: #666;
}

.gro-login__resend {
    margin: 16px 0 24px;
}
.gro-login__resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    font-family: inherit;
}
.gro-login__resend-btn:not(:disabled) {
    color: #141414;
}
.gro-login__resend-btn:disabled {
    cursor: default;
}
.gro-login__resend-timer {
    color: #141414;
    font-weight: 500;
}
.gro-login__resend-btn:not(:disabled) .gro-login__resend-timer { display: none; }

.gro-login__sent-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.gro-login__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.gro-login__btn--primary {
    background: #141414;
    color: #fff;
}
.gro-login__btn--primary:hover {
    background: #000;
    color: #fff;
}
.gro-login__btn--secondary {
    background: #fff;
    color: #141414;
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.gro-login__btn--secondary:hover {
    background: #fafaf7;
    border-color: rgba(0, 0, 0, 0.24);
}
.gro-login__sent-footnote {
    margin: 0;
    font-size: 13px;
    color: #888;
}

/* ───── COOLDOWN state ───── */
.gro-login__cooldown-text {
    margin: 0;
    font-size: 15px;
    color: #d33b3b;
    line-height: 1.5;
}

/* =========================================================================
   Breakpoint: 768 → 1440 (tablet/medium)
   ========================================================================= */
@media (max-width: 1100px) {
    .gro-login__form-wrap {
        padding: 64px 48px 64px 32px;
    }
    .gro-login__title {
        font-size: 28px;
    }
}

/* =========================================================================
   Breakpoint: < 768 (mobile)
   Стрелка скрывается, layout single column, форма сверху
   ========================================================================= */
@media (max-width: 767px) {
    .gro-login {
        padding: 8px;
        align-items: flex-start;
    }
    .gro-login__container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: calc(100vh - 16px);
        border-radius: 24px;
    }
    .gro-login__side {
        padding: 20px 20px 0;
        min-height: auto;
        overflow: visible;
    }
    .gro-login__arrow {
        display: none;
    }
    .gro-login__back {
        margin-top: 16px;
    }
    .gro-login__form-wrap {
        padding: 24px 20px 32px;
        max-width: 100%;
        margin: 0;
        justify-content: flex-start;
    }
    .gro-login__title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    .gro-login__input {
        font-size: 16px;
    }
    .gro-login__sent-head {
        flex-direction: row;
        align-items: flex-start;
    }
    .gro-login__envelope svg {
        width: 44px;
        height: 44px;
    }
    .gro-login__sent-actions {
        flex-direction: column;
    }
    .gro-login__btn {
        width: 100%;
    }
}
