/* Common form styles */
@import "forms-vyzZNVS.css";

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height) - 150px); /* Adjust footer height if needed */
    padding: 2rem 1rem;
}

.form-card {
    width: 100%;
    max-width: 420px;
}

.form-card h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.form-card .auth-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.social-logins-row {
    --social-icon-btn-bg: #172443;
    --social-icon-btn-border: color-mix(in srgb, #172443 72%, #ffffff 28%);
    --social-icon-btn-hover-bg: color-mix(in srgb, #172443 88%, #ffffff 12%);
    --social-icon-btn-shadow: 0 4px 14px color-mix(in srgb, #172443 45%, transparent);

    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

html[data-bs-theme='light'] .social-logins-row {
    --social-icon-btn-bg: #eef2f8;
    --social-icon-btn-border: color-mix(in srgb, #172443 18%, transparent);
    --social-icon-btn-hover-bg: #e2e8f2;
    --social-icon-btn-shadow: 0 4px 12px color-mix(in srgb, #172443 12%, transparent);
}

.social-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--social-icon-btn-border);
    background-color: var(--social-icon-btn-bg);
    color: var(--color-text-primary);
    box-shadow: var(--social-icon-btn-shadow);
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.social-icon-btn:hover {
    background-color: var(--social-icon-btn-hover-bg);
    border-color: color-mix(in srgb, var(--social-icon-btn-border) 80%, #ffffff 20%);
    color: var(--color-text-primary);
    box-shadow: 0 6px 18px color-mix(in srgb, #172443 35%, transparent);
}

.social-icon-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.social-icon-btn--telegram {
    overflow: hidden;
}

.social-icon-btn__visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    pointer-events: none;
}

.social-icon-btn--telegram .social-icon-btn__visual {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    z-index: 2;
}

.social-icon-btn__visual svg {
    width: 24px;
    height: 24px;
}

.social-icon-btn--telegram .social-icon-btn__visual {
    font-size: 1.85rem;
    line-height: 1;
    color: #229ED9;
}

.social-icon-btn__widget-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    width: 240px;
    height: 100%;
    transform: translateX(-50%);
    pointer-events: none;
}

.social-icon-btn__widget-overlay iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.01;
    cursor: pointer;
    border: 0;
    pointer-events: auto;
}

.auth-social-hint {
    text-align: center;
    line-height: 1.45;
}

.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    transition: background-color 0.2s, border-color 0.2s;
    margin-bottom: 1rem;
}

.social-login-btn:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary-hover);
}

.social-login-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.telegram-widget-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-footer-link {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.auth-footer-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

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

.agree-terms {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.agree-terms input {
    margin-right: 10px;
}

.agree-terms label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.agree-terms label a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.agree-terms label a:hover,
.agree-terms label a:focus {
    color: var(--color-primary);
    text-decoration-thickness: 2px;
}
