/* ─── Shared Registration / Login styles ───────────────────────────── */

/* ─── Background ───────────────────────────────────────────────────── */

body.reg-log::before {
    background-image: url('../img/backgrounds/main-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ─── Card container ───────────────────────────────────────────────── */

.rl-container {
    max-width: 540px;
    margin: 100px auto 60px;
    padding: 2.5rem 2.5rem 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ─── Header (logo + title) ────────────────────────────────────────── */

.rl-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
}

.rl-top img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.rl-top h2 {
    font-size: 1.65rem;
    font-weight: 700;
    padding: 0;
    margin: 0;
    color: #1a1a2e;
}

.rl-top .rl-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    text-align: center;
    padding: 0;
    margin: 0;
}

/* ─── Messages ─────────────────────────────────────────────────────── */

.rl-messages {
    margin-bottom: 1.25rem;
}

.rl-message {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.rl-message.error   { background: #fff0f0; color: #c62828; border: 1px solid #ffcdd2; }
.rl-message.success { background: #f0faf0; color: #2e7d32; border: 1px solid #c8e6c9; }
.rl-message.info    { background: #f0f4ff; color: #1565c0; border: 1px solid #bbdefb; }

/* ─── Form layout ──────────────────────────────────────────────────── */

.form-row {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.form-row.two-col {
    grid-template-columns: 1fr 1fr;
}

/* ─── Fields ───────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.form-group label .required-star {
    color: var(--dark-pink);
    margin-left: 1px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #dcdcdc;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #222;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input::placeholder {
    color: #b0b0b0;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--dark-pink);
    box-shadow: 0 0 0 3px rgba(170, 43, 130, 0.1);
}

/* ─── Select styling ───────────────────────────────────────────────── */

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.2rem;
}

/* ─── Submit button ────────────────────────────────────────────────── */

.rl-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--dark-pink) 0%, #8e2470 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(170, 43, 130, 0.45);
}

.rl-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(170, 43, 130, 0.3);
}

.rl-btn:disabled {
    background: linear-gradient(135deg, #7a7a7a 0%, #5a5a5a 100%);
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.turnstile-hint {
    text-align: center;
    font-size: 0.82rem;
    color: #999;
    margin-top: 0.4rem;
    transition: opacity 0.3s ease;
}

/* ─── Checkbox ─────────────────────────────────────────────────────── */

input[type="checkbox"] {
    accent-color: var(--dark-pink);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* ─── Bottom link (switch between login / signup) ──────────────────── */

.rl-switch-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    padding: 0;
}

.rl-switch-link a {
    color: var(--dark-pink);
    text-decoration: none;
    font-weight: 600;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.25s ease;
}

.rl-switch-link a:hover,
.rl-switch-link a:focus-visible {
    background-size: 100% 1.5px;
}

/* ─── Legal text ───────────────────────────────────────────────────── */

.rl-legal {
    font-size: 0.82rem;
    color: #888;
    line-height: 1.5;
    text-align: center;
    padding: 0;
    margin: 0 0 1rem;
}

.rl-legal a {
    color: var(--dark-pink);
    text-decoration: none;
    font-weight: 600;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.25s ease;
}

.rl-legal a:hover,
.rl-legal a:focus-visible {
    background-size: 100% 1.5px;
}

/* ─── Divider with text ────────────────────────────────────────────── */

.rl-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
    color: #aaa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rl-divider::before,
.rl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* ─── Error (inline) ──────────────────────────────────────────────── */

.rl-error {
    color: #c62828;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fff0f0;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ─── Bottom section (remember + legal + btn) ──────────────────────── */

.rl-bottom {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}

.rl-bottom .remember-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.75rem;
}

/* ─── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 680px) {
    .rl-container {
        max-width: 95%;
        margin-top: 80px;
        margin-bottom: 40px;
        padding: 1.5rem 1.25rem;
    }

    .form-row.two-col {
        grid-template-columns: 1fr;
    }
}
