/* Base and Variables - Falabella Official Light Theme */
:root {
    --brand-green: #3B9326;
    /* Primary Action Green */
    --brand-green-hover: #32A837;
    /* Logo Green for hover states */
    --bg-color: #FFFFFF;
    --surface-color: #FFFFFF;
    --text-primary: #333537;
    --text-secondary: #5E6267;
    --border-color: #E0E4E8;
    --error: #E53935;
    --footer-bg: #F8F9FA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PF Beau Sans Pro', Arial, Helvetica, sans-serif;
    background-color: var(--surface-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Allows footer to stick to bottom */
    overflow-x: hidden;
    position: relative;
}

/* Global Header */
.global-header {
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo {
    width: 150px;
    height: auto;
}

/* Main Container */
.container {
    padding: 4rem 2rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    /* Centers the form in the page */
    flex: 1;
    /* Pushes footer to bottom */
    z-index: 1;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Form Styles */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-row {
    display: flex;
    gap: 2rem;
}

.input-group {
    position: relative;
    flex: 1;
}

input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0 8px 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-bottom-color: transparent;
}

.line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-green);
    transition: width 0.3s ease;
}

input:focus~.line,
input:valid~.line {
    width: 100%;
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

input:focus~label,
input:valid~label {
    top: -12px;
    font-size: 0.75rem;
    color: var(--brand-green);
    font-weight: 600;
}

/* Radio Buttons */
.card-question {
    background: #F8F9FA;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.card-question h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 32px;
    transition: color 0.3s;
}

.radio-label:hover {
    color: var(--brand-green);
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 1px solid #A0AAB5;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.radio-label input:checked~.custom-radio {
    border-color: var(--brand-green);
}

.custom-radio:after {
    content: "";
    position: absolute;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-green);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.radio-label input:checked~.custom-radio:after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.radio-label input:checked~span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Checkbox (Terms) */
.terms-group {
    margin-top: -0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 32px;
    line-height: 1.4;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #A0AAB5;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-label input:checked~.custom-checkbox {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
}

.custom-checkbox:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked~.custom-checkbox:after {
    display: block;
}

.terms-link {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Button */
.submit-btn {
    background: var(--brand-green);
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    /* Flatter button commonly used in retail instead of pill */
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: var(--brand-green-hover);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.btn-loader {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeIn 0.5s ease forwards;
    padding: 2rem 0;
}

.success-message svg {
    width: 64px;
    height: 64px;
    background: rgba(59, 147, 38, 0.1);
    padding: 15px;
    border-radius: 50%;
}

.success-message p {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-hidden .form-row,
.form-hidden .card-question,
.form-hidden .terms-group,
.form-hidden .submit-btn {
    display: none;
}

/* Global Footer */
.global-footer {
    width: 100%;
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.global-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Responsive - Tablet / iPad */
@media (min-width: 601px) and (max-width: 1024px) {
    .container {
        max-width: 768px;
        padding: 5rem 4rem;
        /* More breathing room on iPad */
    }

    .form-row {
        gap: 3rem;
        /* Increase gap between columns */
    }

    h1 {
        font-size: 2.5rem;
        /* Larger title for tablet */
    }

    .page-header p {
        font-size: 1.15rem;
    }

    .card-question {
        padding: 2rem 3rem;
        /* Larger padding for the question block */
    }

    .radio-group {
        gap: 3rem;
        /* Spread radio buttons nicely */
    }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
    .container {
        padding-top: 2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 2rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}