/**
 * Portal authentication forms.
 *
 * Scope:
 * - Theme My Login front-end forms only.
 * - Does not alter wp-admin or the plugin files.
 */

.is-opeka-auth-page .govgr-page-layout,
.is-opeka-auth-page .govgr-content-grid {
    max-width: 860px;
}

.is-opeka-auth-page .govgr-page-layout {
    padding-top: 44px;
}

.is-opeka-auth-page .govgr-post-content > h1 {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px 32px 14px;
    border: 1px solid #d1d7dc;
    border-bottom: 0;
    border-top: 4px solid #003476;
    background: #fff;
    color: #0b0c0c;
    font-size: clamp(2rem, 2.8vw, 2.75rem);
    line-height: 1.12;
}

.is-opeka-auth-page .govgr-page-news-section {
    display: none;
}

.tml {
    max-width: 680px;
    margin: 0 auto 48px;
    padding: 22px 32px 32px;
    border: 1px solid #d1d7dc;
    border-top: 0;
    background: #fff;
}

.tml form {
    display: grid;
    gap: 18px;
}

.tml p {
    margin: 0 0 16px;
}

.tml label {
    display: block;
    margin-bottom: 8px;
    color: #0b0c0c;
    font-weight: 700;
}

.tml input[type="text"],
.tml input[type="email"],
.tml input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 2px solid #0b0c0c;
    border-radius: 0;
    background: #fff;
    color: #0b0c0c;
    font: inherit;
    line-height: 1.35;
}

.tml input[type="text"]:focus,
.tml input[type="email"]:focus,
.tml input[type="password"]:focus {
    outline: 3px solid #ffdd00;
    outline-offset: 0;
    box-shadow: inset 0 0 0 2px #0b0c0c;
}

.tml #pass-strength-result,
.tml .pass-strength-result {
    margin: 8px 0 0;
    padding: 10px 12px;
    border-left: 4px solid #003476;
    background: #f4f7fb;
    color: #0b0c0c;
    font-weight: 700;
}

.tml .indicator-hint {
    margin: 8px 0 0;
    color: #505a5f;
    font-size: 0.95rem;
    line-height: 1.45;
}

.tml input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

.tml .tml-rememberme-wrap label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.tml .tml-submit-wrap,
.tml .tml-submit-wrap p {
    margin-top: 8px;
}

.tml button,
.tml input[type="submit"],
.tml .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid #003476;
    border-radius: 0;
    background: #003476;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.tml button:hover,
.tml input[type="submit"]:hover,
.tml .button:hover {
    background: #00275a;
    border-color: #00275a;
    color: #fff;
}

.tml button:focus,
.tml input[type="submit"]:focus,
.tml .button:focus {
    outline: 3px solid #ffdd00;
    outline-offset: 0;
    box-shadow: 0 0 0 3px #0b0c0c;
}

.tml .tml-links,
.tml .tml-dashboard-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 24px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid #d1d7dc;
    list-style: none;
}

.tml .tml-links a,
.tml .tml-dashboard-links a {
    color: #003476;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.tml .tml-alerts {
    margin-bottom: 18px;
}

.tml .tml-errors,
.tml .tml-messages {
    margin: 0 0 20px;
    padding: 16px 18px;
    list-style: none;
}

.tml .tml-errors {
    border-left: 4px solid #d4351c;
    background: #fff4f2;
}

.tml .tml-messages {
    border-left: 4px solid #00703c;
    background: #f3fff7;
}

.tml .tml-error,
.tml .tml-message {
    margin: 0;
}

.tml .tml-dashboard {
    text-align: left;
}

.tml .tml-dashboard-avatar {
    margin-bottom: 16px;
}

.tml .tml-dashboard-avatar img {
    border-radius: 0;
}

.tml .tml-dashboard-greeting {
    margin: 0;
    color: #0b0c0c;
    font-size: 1.25rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .is-opeka-auth-page .govgr-page-layout {
        padding-top: 28px;
    }

    .is-opeka-auth-page .govgr-post-content > h1 {
        padding: 24px 16px 12px;
        font-size: 2rem;
    }

    .tml {
        padding: 24px 16px;
    }

    .tml .tml-links,
    .tml .tml-dashboard-links {
        display: grid;
        gap: 12px;
    }
}
