:root {
    --brand-red: #ef2328;
    --brand-blue-social: #2a5fd1;
    --brand-blue-logo: #001c4b;
    --bg-light: #f4f4f4;
    --white: #ffffff;
    --transition-speed: 0.6s;
}

.registration-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--white);
}

.main-container {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    width: 1000px;
    max-width: 95vw;
    height: 620px;
    max-height: 90vh;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all var(--transition-speed) ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.main-container.active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
}

.main-container.active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show var(--transition-speed);
}

@keyframes show {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

form {
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
    overflow-y: auto;
    /* Enable scroll for long registration form */
}

form::-webkit-scrollbar {
    width: 6px;
}

form::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.logo-form {
    width: 140px;
    margin-bottom: 5px;
}

h1 {
    margin: 5px 0;
    font-size: 24px;
    color: var(--brand-blue-logo);
}

.input-with-icon {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    margin: 6px 0;
}

.input-with-icon i {
    position: absolute;
    right: 15px;
    color: #aaa;
    font-size: 14px;
    cursor: pointer;
}

.input-group-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

input,
select {
    background-color: var(--white);
    border: 1px solid #eee;
    padding: 10px 12px;
    margin: 6px 0;
    width: 100%;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
}

input.is-invalid,
select.is-invalid {
    border-color: #dc3545;
}

input.is-valid,
select.is-valid {
    border-color: #28a745;
}

.btn-main {
    border-radius: 30px;
    border: none;
    background-color: var(--brand-red);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
    padding: 12px 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 15px;
}

.btn-ghost-red {
    background-color: var(--brand-red);
    border: 2px solid var(--white);
    color: var(--white);
    border-radius: 30px;
    padding: 10px 40px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 11px;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-ghost-red:hover {
    background-color: var(--white);
    color: var(--brand-red);
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform var(--transition-speed) ease-in-out;
    z-index: 100;
}

.main-container.active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: var(--brand-blue-social);
    color: var(--white);
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform var(--transition-speed) ease-in-out;
}

.main-container.active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transition: transform var(--transition-speed) ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.main-container.active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.main-container.active .overlay-right {
    transform: translateX(20%);
}

.overlay-panel h1 {
    color: var(--white) !important;
}

.overlay-panel p {
    color: var(--white) !important;
    font-size: 15px;
    margin: 20px 0;
}

.forgot-pass {
    color: #666;
    font-size: 12px;
    text-decoration: none;
    margin: 10px 0;
}

.forgot-pass:hover {
    text-decoration: underline;
}

.terminos-condiciones {
    font-size: 13px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.terminos-condiciones input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.terminos-condiciones label {
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

.footer-links-auth {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-links-auth a {
    color: var(--brand-blue-logo);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.rcw-auth {
    font-size: 10px;
    color: #999;
    margin-top: 15px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .registration-section {
        padding: 5px;
        min-height: auto;
    }

    .main-container {
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        display: block;
        overflow: visible;
        box-shadow: none;
        background: transparent;
    }

    .overlay-container {
        display: none;
    }

    .form-container {
        position: relative;
        width: 100%;
        height: auto;
        opacity: 1 !important;
        transform: none !important;
        background: white;
        border-radius: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
        transition: none;
    }

    /* On mobile, we only show one at a time via JS toggle */
    .sign-up-container {
        display: none;
    }

    .sign-in-container {
        display: flex;
    }

    .main-container.active .sign-in-container {
        display: none;
    }

    .main-container.active .sign-up-container {
        display: flex;
        opacity: 1 !important;
    }

    .input-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    form {
        padding: 30px 15px;
        height: auto;
        min-height: 400px;
    }

    .logo-form {
        width: 120px;
    }

    .mobile-switch {
        display: block !important;
        margin-top: 20px;
        background: #f0f0f0;
        border: none;
        color: var(--brand-blue-logo);
        text-decoration: none;
        font-weight: 600;
        cursor: pointer;
        padding: 10px 20px;
        border-radius: 20px;
        width: 100%;
        font-size: 14px;
        text-align: center;
    }
}

.mobile-switch {
    display: none;
}

/* MODALS */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-modal-backdrop.active {
    display: block;
    opacity: 1;
}

.success-modals {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 30px;
    border-radius: 15px;
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: all 0.3s;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.success-modals.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.btn-modal {
    background: var(--brand-red);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
}