/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f9fc;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full viewport height */
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex: 1; /* Allow main content to grow and push the footer down */
}

/* login page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.logo img {
    width: 200px;
    margin-bottom: 30px;
}

.login-form {
    background-color: #ffffff;
    border: 1px solid #d1e3f0;
    border-radius: 10px;
    padding: 20px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 260px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2d5d94;
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #d1e3f0;
    border-radius: 5px;
    box-sizing: border-box;
}

.login-form input::placeholder {
    font-size: 10px;
    color: #999;
  }

.login-form ::-webkit-input-placeholder { /* Chrome/Safari/Opera */
font-size: 12px;
color: #999;
}
.login-form ::-moz-placeholder { /* Firefox 19+ */
font-size: 12px;
color: #999;
}
.login-form :-ms-input-placeholder { /* IE 10+ */
font-size: 12px;
color: #999;
}
.login-form :-moz-placeholder { /* Firefox 18- */
font-size: 12px;
color: #999;
}

.login-form button {
    width: 100%;
    padding: 10px;
    background-color: #2ccdf0;
    color: #000000;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #2178d5;
}

.login-links {
    width: 100%;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #d1e3f0;
    text-align: center;
}

.login-links a {
    color: #2d5d94;
    text-decoration: none;
}

.login-links a:hover {
    color: #1b3f6b;
}

/* Header Styles */
header {
    /* background: linear-gradient(90deg, #2d5d94 0%, #2d5d94 50%, #4b7db1 100%); */
    /* background: linear-gradient(90deg, #2ccdf0 0%, #2ccdf0 50%, #2178d5 100%); */
    background: linear-gradient(90deg, #2178d5 0%, #2178d5 50%, #2ccdf0 100%);
    display: grid;
    grid-template-columns: auto 1fr auto; /* Logo, menu, and toggle */
    align-items: center;
    padding: 10px 20px;
}

.header-logo {
    grid-column: 1; /* Place logo in the first column */
    cursor: pointer;
}

.header-logo img {
    height: 35px;
    max-width: 100%;
    width: auto;
}

.menu-container {
    grid-column: 2;
    width: 100%;
}

.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0 20px;
}

.menu-left {
    display: flex;
    gap: 15px;
    margin-left: 20px;
}

.menu li:last-child {
    margin-left: auto;
    padding-right: 20px;
}

.menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    display: inline-block;
}

.menu a:hover {
    background-color: #1b3f6b;
    border-radius: 5px;
}

.menu-toggle {
    grid-column: 3; /* Place toggle in the last column */
    display: none; /* Hidden by default */
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    text-align: right; /* Align toggle to the right */
}

.menu li:last-child .account-link {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 8px 12px;
    margin-left: 12px;
    position: relative;
    padding-left: 32px;
    font-size: 10px;
    color: #000000;
}

.menu li:last-child .account-link::before {
    content: '\f007'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 10px;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 12px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1000;
    padding: 8px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    display: block;
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    color: #333;
    padding: 8px 16px;
    display: block;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #2178d5;
    border-radius: 0;
}

/* Account Dropdown Specific Styles */
.account-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

/* Responsive Design */
@media (max-width: 375px) {
    header {
        padding: 5px 8px;
    }
    
    .header-logo img {
        height: 24px;
    }
    
    .menu a {
        font-size: 14px;
    }

    .menu li:last-child .account-link {
        background-color: transparent;
        border-radius: 0;
        padding: 10px;
        margin-left: 0;
        color: #ffffff;
        font-size: 14px;
    }

    .menu li:last-child .account-link::before {
        display: none;
    }

    .dropdown-toggle {
        font-size: 14px;
        padding: 5px;
    }
    
    .dropdown-menu {
        min-width: 160px;
    }
    
    .dropdown-menu a {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px 12px;
    }
    
    .header-logo img {
        height: 28px;
    }
    
    .menu.active {
        top: 50px;
    }
    
    .menu li:last-child .account-link {
        background-color: transparent;
        border-radius: 0;
        padding: 10px;
        margin-left: 0;
        color: #ffffff;
        font-size: 16px;
    }

    .menu li:last-child .account-link::before {
        display: none;
    }

    .dropdown-menu {
        min-width: 180px;
    }
    
    .dropdown.active .dropdown-menu {
        top: 45px;
    }
}

@media (max-width: 1023px) {
    .menu-container {
        text-align: right;
    }

    .menu {
        display: none;
        padding: 0;
    }

    .menu.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: #2d5d94;
        position: absolute;
        top: 60px;
        right: 0;
        left: 0;
        width: 100%;
        padding: 10px 0;
    }

    .menu-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0;
        gap: 0;
    }

    .menu li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }

    .menu a {
        width: 100%;
        text-align: center;
        display: block;
        padding: 10px;
    }

    .menu li:last-child .account-link,
    .dropdown-menu li:last-child a {
        background-color: transparent;
        border-radius: 0;
        color: #ffffff;
        font-size: 14px;
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 10px 0;
        margin: 0;
    }

    .menu li:last-child .account-link::before {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .dropdown-menu {
        display: none;
        position: static;
        background-color: rgba(255,255,255,0.1);
        box-shadow: none;
        width: 100%;
        padding: 0;
    }

    .dropdown-menu.show {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .dropdown-menu li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .account-dropdown .dropdown-menu a,
    .dropdown-menu a {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
        color: #ffffff;
    }
    
    .dropdown-menu a:hover {
        background-color: rgba(255,255,255,0.1);
        color: #ffffff;
    }
    
    .account-dropdown .dropdown-menu {
        width: 100%;
        text-align: center;
    }

}

/* Form Navigation Button Container */
.form-nav-buttons {
    position: sticky;
    bottom: 20px;
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    margin-top: 24px;
    /* background-color: rgba(255, 255, 255, 0.9); */
    background-color: #f4f9fc;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    z-index: 10;
}

/* Button Styles */
.form-nav-buttons button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.form-nav-buttons .prev-button {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1e3f0;
}

.form-nav-buttons .prev-button:hover {
    background-color: #e5e7eb;
}

.form-nav-buttons .next-button,
.form-nav-buttons .submit-button {
    background-color: #2178d5;
    color: white;
    margin-left: auto;
}

.form-nav-buttons .next-button:hover,
.form-nav-buttons .submit-button:hover {
    background-color: #1b62b3;
}

.form-nav-buttons .submit-button {
    background-color: #10b981;
}

.form-nav-buttons .submit-button:hover {
    background-color: #059669;
}

@media (max-width: 992px) {
    .menu {
        gap: 10px;
    }
    .menu li {
        margin: 0 10px;
    }

    .dropdown {
        margin: 0 5px;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
}

@media (max-width: 1024px) {
    .menu a {
        font-size: 14px;
        padding: 5px 8px;
    }

    .dropdown-toggle {
        font-size: 14px;
        padding: 5px 8px;
    }

    .dropdown-menu {
        min-width: 190px;
    }
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    color: #777;
    background-color: #f4f9fc;
    position: relative;
    width: 100%;
}

@media (max-width: 600px) {
    main {
        padding: 15px;
    }
}

/* Onboarding Form Styles */
.onboarding-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: 95vh;
}

/* Button styling to match newcustomeroffer.js */
#form-action-button {
    background-color: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

#form-action-button:hover {
    background-color: #059669;
}

.onboarding-container h2 {
    color: #2178d5;
    margin-bottom: 20px;
    border-bottom: 1px solid #d1e3f0;
    padding-bottom: 10px;
}

.form-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #d1e3f0;
}

.tab-button {
    background: none;
    border: none;
    padding: 20px 20px;
    margin-right: 5px;
    cursor: pointer;
    font-weight: 600;
    color: #777;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: #2178d5;
    border-bottom: 3px solid #2178d5;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-section h3 {
    color: #2d5d94;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 calc(50% - 10px);
}

/* Force city, state, zip on same row */
.location-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
}

.location-row .city-field {
    flex: 3;
    min-width: 0;
}

.location-row .state-field {
    flex: 1;
    min-width: 120px;
}

.location-row .zip-field {
    flex: 1;
    min-width: 100px;
}

/* Adjusted to make State + Gap + Zip = Admin User Last Name width */
.location-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    /* border-bottom: 1px solid #d1e3f0; */
    border-bottom: 1px solid #4c78d5;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.location-row .city-field {
    flex: 1;
    width: calc(50% - 10px);
}

.location-row .state-field {
    flex: 0 0 calc(33.33% - 13.33px);
    min-width: 0;
}

.location-row .zip-field {
    flex: 0 0 calc(16.67% - 16.67px);
    min-width: 0;
}

.onboarding-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e53e3e;
}

.onboarding-container input[type="text"],
.onboarding-container input[type="email"],
.onboarding-container select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1e3f0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.onboarding-container input:focus,
.onboarding-container select:focus {
    outline: none;
    border-color: #2178d5;
    box-shadow: 0 0 0 2px rgba(33, 120, 213, 0.2);
}

/* Error styling */
.error {
    border-color: #e53e3e;
}

.error-message {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 6px;
}

/* Style fixes for header and buttons */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    border-bottom: 1px solid #d1e3f0;
    padding-bottom: 20px;
    width: 100%;
}

.header-container h2 {
    margin: 0;
    color: #2178d5;
    border-bottom: none;
    padding-bottom: 0;
}

.header-buttons {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row .form-group {
        flex: 1 1 100%;
    }
    
    .onboarding-container {
        padding: 20px;
    }

    /* Adjust location row for mobile */
    .location-row {
        flex-direction: column;
        gap: 15px;
    }

    .location-row .city-field,
    .location-row .state-field,
    .location-row .zip-field {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Confirmation Container Styles */
.confirmation-container {
    margin-top: 20px;
    width: 100%;
}

.confirmation-message {
    background-color: #f8f9fa;
    border: 1px solid #d1e3f0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.confirmation-message h3 {
    color: #2d5d94;
    margin-bottom: 20px;
}

.email-preview {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.register-button {
    display: inline-block;
    background-color: #2178d5;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 15px;
    transition: background-color 0.2s;
}

.register-button:hover {
    background-color: #1b62b3;
}