/* ==================================================
   RESET
================================================== */

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

/* ==================================================
   FONT INITIALIZATION
================================================== */

body,
html,
.paragraph,
.headline {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: #eff7ff;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: normal;
}

/* ==================================================
   TYPOGRAPHY SYSTEM - RESPONSIVE SCALING
================================================== */

/* BASE TYPOGRAPHY (default) */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

/* Login-specific typography */
.hd-login {
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 auto;
    max-width: 100%;
    word-wrap: break-word;
    text-align: center;
    width: 100%;
    padding: 0 3rem !important;
    display: none !important;
}

.sbh-login {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.4;
    color: #fff;
    margin-top: 0 !important;
    max-width: 100%;
    word-wrap: break-word;
    text-align: center;
    width: 100%;
    display: none !important;
}

/* ==================================================
   LEFT COLUMN
================================================== */

.left-column {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/images/hero-bkg-ee-public-grey.jpg') no-repeat center center;
    background-size: cover;
    height: 100vh;
    width: 100%;
    position: relative;
}

.text-wrapper-signup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    gap: 1rem;
    min-height: 100vh;
}

.logo img {
    max-width: 100%;
    width: 280px;
    height: auto;
    margin-bottom: 0;
    display: none !important;
}

.headline-wrapper {
    width: 100%;
    text-align: center;
    padding: 0;
    display: none !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.headline-wrapper p {
    text-align: center;
    padding: 1rem 2rem;
    color: #fff;
    font-weight: 300;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
}

/* ==================================================
   BACK TO HOME BUTTON
================================================== */

.back-to-home-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-to-home-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #333;
    text-decoration: none;
}

.back-to-home-btn i {
    margin-right: 0.3rem;
    font-size: 0.8rem;
}

/* ==================================================
   FORM CONTAINER
================================================== */

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.right-column-signup {
    background-color: #1a1a1a !important;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.container-signup {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ==================================================
   FORM STYLING
================================================== */

#registration-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.signup-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.signup-form-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-width: 0; /* Allow flex items to shrink below content size */
}

/* When there are 3 columns in a row, make them smaller */
.signup-form-row:has(.signup-form-column:nth-child(3)) .signup-form-column {
    flex: 0 0 calc(33.333% - 7px);
    max-width: calc(33.333% - 7px);
}

/* Special row for dealer group code */
.dealer-group-code-row {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.dealer-group-code-column {
    max-width: 400px;
    width: 100%;
}

/* Affiliate brands column */
.affiliate-brands-column {
    width: 100%;
    flex: 1 1 100%;
    max-width: 100%;
}

/* ==================================================
   FORM ELEMENTS
================================================== */

label {
    color: #ffffff !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

/* Form input styles now handled by global-forms.css */

/* Dark theme overrides for form inputs */
.right-column-signup input[type="text"],
.right-column-signup input[type="email"],
.right-column-signup input[type="password"],
.right-column-signup input[type="tel"],
.right-column-signup input[type="number"],
.right-column-signup select,
.right-column-signup textarea,
.right-column-signup .form-control {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.right-column-signup input[type="text"]:focus,
.right-column-signup input[type="email"]:focus,
.right-column-signup input[type="password"]:focus,
.right-column-signup input[type="tel"]:focus,
.right-column-signup input[type="number"]:focus,
.right-column-signup select:focus,
.right-column-signup textarea:focus,
.right-column-signup .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-color: #4ea5f2 !important;
    box-shadow: 0 0 0 3px rgba(78, 165, 242, 0.3) !important;
}

.right-column-signup input::placeholder,
.right-column-signup textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.right-column-signup select option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Special input styling - overrides for global-forms.css */
.dealer-group-code-input {
    text-align: center !important;
}

.location-count-input {
    text-align: center !important;
    font-size: 1rem !important;
}

.brand-request-textarea {
    resize: vertical !important;
    font-family: inherit !important;
    height: auto !important;
    min-height: 100px !important;
}

/* ==================================================
   DEALER GROUP LINKS
================================================== */

.dealer-group-links {
    text-align: center;
    margin-bottom: 1rem;
}

.dealer-group-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
}

.dealer-group-text-spacing {
    margin-top: 0.15rem;
    display: inline-block;
}

.dealer-group-link {
    color: #4ea5f2 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.dealer-group-link:hover {
    color: #3a7bb9 !important;
    text-decoration: underline;
}

/* Dealer group code specific styling */
.dealer-group-code-label {
    text-align: center;
}

.dealer-group-code-error {
    text-align: center;
    display: block;
}

.dealer-group-code-help {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.6em;
    margin-top: 0.1rem;
    display: block;
    text-align: center;
}

/* ==================================================
   AFFILIATE BRANDS
================================================== */

.affiliate-brands-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.affiliate-brands-tooltip {
    margin-left: 3px;
    color: #4ea5f2;
    cursor: help;
    font-size: 12px;
}

.checkbox-container {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    padding: 8px;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0px;
    align-items: center;
    justify-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100% !important;
    box-sizing: border-box !important;
}

.checkbox-container::-webkit-scrollbar {
    display: none;
}

#affiliate_brands_container .affiliate-brands-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    font-style: italic !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 14px !important;
    grid-column: 1 / -1 !important;
    display: block !important;
    width: 100% !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
    min-height: 40px !important;
    line-height: 1.4 !important;
}

.checkbox-item {
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    gap: 3px;
    font-size: 13px;
    height: 100%;
    max-height: 60px;
}

.checkbox-item:hover {
    background: rgba(78, 165, 242, 0.1);
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked {
    background: #4ea5f2;
    border-color: #4ea5f2;
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-item input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 165, 242, 0.3);
}

.checkbox-item label {
    color: #ffffff !important;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
    user-select: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================================================
   CONTACT US LINK
================================================== */

.contact-us-link {
    text-align: center;
    margin-top: -0.1rem;
    margin-bottom: 0.3rem;
}

.contact-us-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
}

.contact-us-link-text {
    color: #4ea5f2 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-us-link-text:hover {
    color: #3a7bb9 !important;
    text-decoration: underline;
}

/* ==================================================
   HIDDEN FORMS
================================================== */

.hidden-form {
    display: none;
}

.form-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: #ffffff !important;
    font-weight: 600;
    color: #ffffff !important;
}

/* ==================================================
   BUTTONS
================================================== */

.authbutton {
    margin-top: 1.5rem !important;
}

.brand-request-submit,
.dealer-group-submit {
    margin-top: 1rem;
}

.back-to-registration-btn {
    margin-top: 0.5rem;
    background: transparent;
    color: #4ea5f2;
    border: 1px solid #4ea5f2;
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-registration-btn:hover {
    background: #4ea5f2;
    color: #ffffff;
}

/* ==================================================
   SELECT2 STYLING
================================================== */

.select2-container {
    max-width: 100%;
    width: 100% !important;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    height: 38px !important;
    padding: 0.5rem 0.75rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container .select2-selection--single .select2-selection__rendered,
.select2-container .select2-selection--multiple .select2-selection__rendered {
    color: #ffffff !important;
    line-height: 1.5 !important;
    padding: 0 !important;
}

.select2-container .select2-selection--single .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.select2-container--focus .select2-selection--multiple,
.select2-container--focus .select2-selection--single,
.select2-container.select2-container--focus .select2-selection--multiple,
.select2-container.select2-container--focus .select2-selection--single {
    border-color: #4ea5f2 !important;
    box-shadow: 0 0 0 0.2rem rgba(78, 165, 242, 0.25) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    outline: none !important;
}

.select2-dropdown {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.select2-results__option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.select2-results__option--highlighted {
    background-color: rgba(78, 165, 242, 0.3) !important;
    color: #ffffff !important;
}

.select2-results__option[aria-selected="true"] {
    background-color: rgba(78, 165, 242, 0.2) !important;
}

/* ==================================================
   ERROR MESSAGES
================================================== */

.error-message {
    color: #ff6b6b !important;
    font-size: 0.875em;
    margin-top: 0.25rem;
    font-weight: 500;
}

.error-border {
    border-color: #dc3545 !important;
}

/* ==================================================
   RESPONSIVE BREAKPOINTS
================================================== */

/* ========== 1200px BREAKPOINT ========== */
@media (max-width: 1200px) {
    h1 { font-size: 2.7rem; }
    h2 { font-size: 2.7rem; }
    h3 { font-size: 1.6rem; }
    h4 { font-size: 1.4rem; }
    h5 { font-size: 1.15rem; }
    h6 { font-size: 1rem; }
    p { font-size: 0.95rem; }
    
    .hd-login {
        font-size: 2.1rem;
        padding: 0 4rem !important;
    }
    
    .sbh-login {
        font-size: 0.95rem;
    }
    
    .text-wrapper-signup {
        padding: 1.5rem;
        gap: 1.2rem;
    }
    
    .logo img {
        width: 250px;
    }
    
    .right-column-signup {
        max-width: 500px;
        padding: 1.5rem;
    }
    
    .back-to-home-btn {
        top: 0.4rem;
        left: 0.4rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Hide logo and headlines in 1200px */
    .logo img,
    .hd-login,
    .sbh-login {
        display: none !important;
    }
    
    /* Affiliate brands container - 4 per row on 1200px */
    .checkbox-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Button spacing for 1200px */
    .authbutton {
        margin-top: 1.2rem !important;
    }
}

/* ========== 900px BREAKPOINT ========== */
@media (max-width: 900px) {
    h1 { font-size: 2.6rem; }
    h2 { font-size: 2.6rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.3rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 0.95rem; }
    p { font-size: 0.9rem; }
    
    .hd-login {
        font-size: 2rem;
        padding: 0 8rem !important;
    }
    
    .sbh-login {
        font-size: 0.9rem;
    }
    
    .logo img {
        width: 200px;
    }
    
    .text-wrapper-signup {
        padding: 1.2rem;
        gap: 1rem;
        max-width: 90%;
    }
    
    .right-column-signup {
        max-width: 450px;
        padding: 1.5rem;
        gap: 1.2rem;
    }
    
    .back-to-home-btn {
        top: 0.3rem;
        left: 0.3rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .headline-wrapper p {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }
    
    /* Hide logo and headlines in 900px */
    .logo img,
    .hd-login,
    .sbh-login {
        display: none !important;
    }
    
    /* Affiliate brands container - 3 per row on 900px */
    .checkbox-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Button spacing for 900px */
    .authbutton {
        margin-top: 1rem !important;
    }
}

/* ========== 576px BREAKPOINT ========== */
@media (max-width: 576px) {
    /* Typography scaling */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    p { font-size: 0.85rem; }
    
    /* Login headlines */
    .hd-login {
        font-size: 1.8rem;
        padding: 0 1rem !important;
    }
    
    .sbh-login {
        font-size: 0.85rem;
    }
    
    /* Layout adjustments */
    .text-wrapper-signup {
        padding: 1rem;
        gap: 0.8rem;
        max-width: 95%;
    }
    
    .logo img {
        width: 180px;
    }
    
    .right-column-signup {
        max-width: 100% !important;
        padding: 1rem !important;
        gap: 1rem !important;
        display: flex !important;
    }
    
    .back-to-home-btn {
        top: 0.2rem;
        left: 0.2rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    
    /* Mobile message */
    .headline-wrapper.font-ko {
        display: block !important;
    }
    
    .headline-wrapper p {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        display: block !important;
    }
    
    /* Form elements */
    .form-title {
        font-size: 1rem;
    }
    
    /* Stack form columns vertically on mobile */
    .signup-form-row {
        flex-direction: column;
        gap: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .signup-form-column {
        width: 100%;
        flex: none;
    }
    
    /* Checkbox container mobile adjustments */
    .checkbox-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Hide logo and headlines in 576px */
    .logo img,
    .hd-login,
    .sbh-login {
        display: none !important;
    }
    
    /* Hide reCAPTCHA badge on mobile - still functional */
    .grecaptcha-badge {
        visibility: hidden !important;
        opacity: 0 !important;
    }
}