/* Base Layout Styles - Extracted from base templates */
/* Modern, accessible, and maintainable CSS */

/* Root Variables */
:root {
    --color-primary: #0B3D2E;
    --color-primary-dark: #111827;
    --color-text: #2c3e50;
    --color-text-light: #ecf0f1;
    --color-bg-light: #f5f6fa;
    --color-bg-blue: #e1eafc;
    --color-border: #e5e5e5;
    --color-link: #d87c1c;
    --color-success: #28a745;
    --color-error: #dc3545;
    --color-warning: #ffc107;
    --max-width: 900px;
    --transition-speed: 0.3s;
}

/* Base Container */
.BASE {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.BASE--logo {
    width: var(--max-width);
    max-width: 100vw;
    margin: 0 auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.BASE--menu {
    width: var(--max-width);
    max-width: 100vw;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 0;
    flex: 1;
}

.main-content {
    width: var(--max-width);
    max-width: 100vw;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    flex: 1;
}

/* Header Table Layout */
.header-table-wrapper {
    width: 100%;
}

.header-table {
    width: 100%;
    border-collapse: collapse;
}

.header-table .td-logo {
    width: 35%;
    text-align: left;
}

.header-table .td-messages {
    width: 40%;
    text-align: center;
}

.header-table .td-auth {
    width: 25%;
    text-align: right;
    white-space: nowrap;
}

.brand-logo {
    max-width: 100%;
    height: auto;
}

/* Auth Messages */
.auth-message {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.acting-as-banner {
    font-size: 12px;
    color: #000;
    background-color: var(--color-warning);
    padding: 2px 5px;
    margin: 0 auto 2px auto;
    border-radius: 3px;
    display: block;
    width: fit-content;
    font-weight: bold;
}

.acting-as-banner a {
    color: #007bff;
    text-decoration: underline;
}

/* Auth Buttons */
.auth-buttons-unauth {
    white-space: nowrap;
}

.btn-signup,
.btn-signin,
.btn-signout {
    padding: 8px 16px;
    color: var(--color-text);
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-signup {
    background: var(--color-bg-light);
    margin-right: 5px;
}

.btn-signin,
.btn-signout {
    background: var(--color-bg-blue);
}

.btn-signup:hover {
    background-color: #dcdde1;
}

.btn-signin:hover,
.btn-signout:hover {
    background-color: #b2c8f8;
}

/* Top Menu */
.top-menu {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    font: 14px sans-serif;
    border-radius: 4px 4px 0 0;
}

.top-menu > li {
    position: relative;
}

.top-menu li a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text-light);
    text-decoration: none;
    transition: background var(--transition-speed);
    white-space: nowrap;
}

.top-menu a:hover {
    background: var(--color-primary-dark);
}

.top-menu li ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a202c;
    min-width: 170px;
    z-index: 1000;
}

.top-menu li:hover > ul {
    display: block;
}

.top-menu li ul li {
    position: relative;
}

.top-menu li ul li ul {
    top: 0;
    left: 100%;
}

.has-submenu > a::after {
    content: " ▼";
    float: right;
    font-size: 0.8em;
}

/* Form Utilities */
.form-select {
    height: 40px;
}

/* Flash Messages - Popup Overlay */
.flash-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.flash-popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 600px;
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

.flash-popup-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    gap: 12px;
}

.flash-popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.flash-success .flash-popup-icon {
    background-color: var(--color-success);
    color: white;
}

.flash-error .flash-popup-icon,
.flash-danger .flash-popup-icon {
    background-color: var(--color-error);
    color: white;
}

.flash-warning .flash-popup-icon {
    background-color: var(--color-warning);
    color: #333;
}

.flash-popup-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.flash-popup-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.flash-popup-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.flash-popup-message {
    padding: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

/* Banner */
.banner {
    width: 100%;
    background: url('/images/header-background.gif') repeat-x;
    height: 160px;
}

.banner-inner {
    width: var(--max-width);
    margin: 0 auto;
    height: 160px;
    background: url('/images/header-banner.jpg') no-repeat;
}

/* Footer */
.site-footer {
    width: 100%;
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(to bottom, #f6f6f6 0, #fff 100%);
    font-family: sans-serif;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    margin: 0 auto;
}

.footer-links a {
    color: var(--color-link);
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .BASE--logo,
    .BASE--menu,
    .main-content {
        width: 100vw;
        max-width: 100vw;
        padding-left: 0;
        padding-right: 0;
        margin: 0 auto;
    }

    .flash-popup-content {
        min-width: 90%;
        max-width: 90%;
        margin: 0 20px;
    }

    .banner-inner {
        width: 100%;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* New User Prompt/Auth Buttons for nomenu header */
.auth-buttons-unauth-header {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.new-user-prompt {
    padding: 12px 0;
    color: var(--color-text);
    font-weight: bold;
}

/* Auth Messages in header */
.auth-message {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.acting-as-banner {
    font-size: 12px;
    color: #000;
    background-color: var(--color-warning);
    padding: 2px 5px;
    margin: 0 auto 2px auto;
    border-radius: 3px;
    display: block;
    width: fit-content;
    font-weight: bold;
}

.acting-as-banner a {
    color: #007bff;
    text-decoration: underline;
}

/* Legal Document Containers (TOS, Privacy Policy) */
.tos-container,
.privacy-container {
    max-width: 1200px;
    margin: 32px auto;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 24px 32px;
}

.tos-header,
.privacy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 15px;
}

.tos-title,
.privacy-title {
    font-size: 2rem;
    font-weight: bold;
    color: #444;
    font-family: Arial, Helvetica, sans-serif;
    flex: 1;
}

.tos-actions,
.privacy-actions {
    display: flex;
    gap: 10px;
}

.tos-actions .btn,
.privacy-actions .btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.tos-actions .btn:hover,
.privacy-actions .btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.tos-actions .btn-primary,
.privacy-actions .btn-primary {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.tos-actions .btn-primary:hover,
.privacy-actions .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.tos-metadata,
.privacy-metadata {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.tos-content {
    font-size: 1.1rem;
    color: #444;
    font-family: Arial, Helvetica, sans-serif;
    text-align: justify;
}

.tos-content p {
    margin-bottom: 12px;
}

.tos-content strong {
    font-weight: bold;
}

div.privacy-policy {
    border: 0 none;
    height: auto;
    width: auto;
    color: #656565;
    font-size: 12px;
    margin: 5px 20px;
    padding: 0;
    text-align: justify;
}

div.privacy-policy ol,
div.privacy-policy ul {
    margin: 0 40px;
}

div.privacy-policy ul li {
    list-style-type: disc;
}

/* Responsive Legal Documents */
@media (max-width: 768px) {
    .tos-container,
    .privacy-container {
        padding: 16px 20px;
    }
    
    .tos-title,
    .privacy-title {
        font-size: 1.5rem;
    }
    
    .tos-header,
    .privacy-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tos-actions,
    .privacy-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Print Styles */
@media print {
    .tos-actions,
    .privacy-actions {
        display: none;
    }
}

/* ============================================
   MENU NAVIGATION STYLES
   ============================================ */

/* Base menu structure */
.top-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #0B3D2E 0%, #064028 100%);
    position: relative;
    z-index: 100;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.top-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.top-menu > li > a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.top-menu > li > a:hover {
    background: rgba(188, 204, 41, 0.2);
    color: #bccc29;
}

.top-menu > li.active > a {
    background: #007bff;
    color: #fff;
}

/* Submenu (dropdowns) */
.has-submenu > ul {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background: linear-gradient(to bottom, #0B3D2E 0%, #064028 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    min-width: 220px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.has-submenu:hover > ul {
    display: block;
}

/* Nested submenu positioning */
.has-submenu ul li {
    position: relative;
    margin: 0;
    padding: 0;
}

.has-submenu ul li > a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.has-submenu ul li > a:hover {
    background: rgba(188, 204, 41, 0.2);
    color: #bccc29;
}

/* Nested submenu (third level and beyond) */
.has-submenu ul .has-submenu > ul {
    left: 100%;
    top: 0;
    margin-left: 2px;
}

/* Visual indicator for submenu items */
.has-submenu > a::after {
    content: ' ▾';
    font-size: 0.8em;
    margin-left: 5px;
}

.has-submenu ul .has-submenu > a::after {
    content: ' ▸';
    float: right;
    margin-left: 10px;
}

.top-menu a:hover {
    color: #bccc29;
}

/* Mobile responsiveness for menu */
@media (max-width: 768px) {
    .top-menu {
        flex-direction: column;
    }

    .top-menu > li {
        width: 100%;
    }

    .has-submenu > ul {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 20px;
    }

    .has-submenu:hover > ul,
    .has-submenu.open > ul {
        display: block;
    }

    .has-submenu ul .has-submenu > ul {
        left: auto;
        margin-left: 20px;
    }
}

/* ============================================
   SIGNUP PAGE STYLES
   ============================================ */

/* Year Promo Badge */
.yearpromo {
    background: #f22;
    color: #fff;
    display: inline-block;
    font-size: 0.8em;
    padding: 3px;
    border: 2px solid #000;
    margin-left: 5px;
}

/* Signup Container */
#sub-wrapper {
    width: 1008px;
    min-height: 526px;
    margin: auto;
}

/* Two Column Layout */
.left-hand-side {
    width: 657px;
    background: #f9f9f9;
    border: #e1e1e1 1px solid;
    margin-left: 13px;
    margin-top: 22px;
    float: left;
}

.right-hand-side {
    width: 305px;
    background: #f9f9f9;
    border: #e1e1e1 1px solid;
    margin-right: 10px;
    margin-top: 22px;
    float: right;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Headings */
.save-money-heading {
    width: 522px;
    font: bold 18px/1.3 Arial, Helvetica, sans-serif;
    color: #343434;
    margin: 15px 0 0 6px;
}

.rhs-head {
    height: 38px;
    background: #89b22e;
    margin: auto;
    color: white;
    font-weight: bold;
    padding: 0 0 10px 0;
    text-align: center;
    text-shadow: 2px 2px #080;
}

.rhs-head .text-green {
    color: #6d2;
}

.rhs-head .text-dark-green {
    color: #040;
}

.rhs-head .text-white {
    color: #fff;
}

/* Bullets and Video Section */
.bullets-video-column {
    width: 657px;
    height: 247px;
    margin-top: 13px;
}

.bullet-column {
    width: 235px;
    height: 242px;
    float: left;
}

.bullet-column ul {
    padding-left: 50px;
}

.bullet-column li {
    font: bold 13px Arial, Helvetica, sans-serif;
    color: #4c4c4c;
    list-style-image: url(/images/signup/green-check.png);
    padding-top: 24px;
}

.video-column {
    width: 347px;
    height: 242px;
    float: right;
}

.video-wrapper {
    float: right;
    width: 400px;
    overflow: hidden;
}

.video-base {
    width: 340px;
    height: 230px;
    background: url(/images/signup/video-base.png) no-repeat;
    margin-left: 3px;
    padding-top: 10px;
    padding-left: 6px;
}

/* Thumbnails */
.thumbnails-div {
    clear: left;
    width: 100%;
    height: 100px;
    margin-top: 31px;
}

.thumbnails-div img {
    border: 1px #d4d4d4 solid;
    margin-top: 5px;
}

.thumbnail {
    width: 97px;
    height: 99px;
    font: bold 13px Arial, Helvetica, sans-serif;
    color: #4c4c4c;
    text-align: center;
    margin-left: 11px;
    float: left;
}

/* Signup Form */
.sign-content {
    width: 305px;
    margin: 0;
    padding: 0;
}

.sign-content dl {
    width: 100%;
}

.sign-content label {
    font: normal 13px Arial, Helvetica, sans-serif;
    color: #4c4c4c;
    text-align: right;
}

/* Form Row Layout */
.sign-content .form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
}

.sign-content .form-row label {
    min-width: 120px;
    margin-right: 8px;
    text-align: right;
    padding-top: 4px;
}

.sign-content .form-row .required {
    color: #c00;
    margin-left: 4px;
    font-weight: bold;
}

/* Input Group */
.sign-content .input-group {
    width: 165px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sign-content .form-row input[type="text"],
.sign-content .form-row input[type="email"],
.sign-content .form-row input[type="password"],
.sign-content .form-row input[type="tel"] {
    width: 157px;
    background: #fff;
    height: 30px;
    padding: 2px;
    border: #85ae2b 2px solid;
}

/* Subscription Notes */
.subscription-notes {
    color: #656565;
    font-size: 11px;
}

.subscription-notes span {
    margin-left: 25px;
}

/* Error Display */
.show-error {
    color: #c00;
    font-size: 0.95em;
    margin-top: 2px;
}

/* Agreement Checkbox */
.agreement {
    max-width: 270px;
    margin: 15px auto 0 auto;
    display: flex;
    align-items: flex-start;
}

.agreement input[type="checkbox"] {
    margin-right: 5px;
    margin-top: 2px;
}

.agreement-errors {
    max-width: 270px;
    margin: 0 auto 15px auto;
    text-align: center;
}

/* Pricing Display */
.pricing-display {
    margin: 5px;
    text-align: center;
    width: 100%;
}

.promo-discount-message {
    text-align: center;
    margin-top: -8px;
    padding-bottom: 10px;
    width: 100%;
}

.promo-discount-text {
    font-size: 0.9em;
    color: #f00;
    font-weight: bold;
}

/* Signup Form Wrapper */
.signup-form-wrapper {
    width: 305px;
}

/* OOIDA Discount Note */
.ooida-discount-note {
    font-size: 0.85em;
    color: #1e452a;
    font-weight: bold;
    margin-top: 5px;
}

/* Loading Animation */
#loading_animation {
    margin-left: 46px;
    display: none;
}

/* Responsive Design for Signup */
@media (max-width: 1040px) {
    #sub-wrapper {
        width: 100%;
    }

    .left-hand-side,
    .right-hand-side {
        float: none;
        margin: 10px auto;
    }
}

/* ============================================
   SIGNUP FORM CONTAINER STYLES
   (Used by account_details, address_one_truck, one_truck_signup_page2)
   ============================================ */

.inner-container-signup {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.inner-container-signup h2 {
    margin-bottom: 25px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.inner-container-signup h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Form Table Layout */
.form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto 20px auto;
}

.form-table tr {
    height: 45px;
}

.form-table td {
    padding: 0 5px;
    vertical-align: top;
}

.form-table td:first-child {
    width: 170px;
    text-align: right;
    font-weight: 600;
    color: #4c4c4c;
    font-size: 13px;
    padding-top: 5px;
}

.form-table .input-group {
    width: 170px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-table .input-group input[type="text"],
.form-table .input-group input[type="tel"],
.form-table .input-group input[type="number"],
.form-table .input-group input[type="email"],
.form-table .input-group select {
    width: 157px;
    height: 32px;
    padding: 2px;
    border: 2px solid #85ae2b;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
}

.form-table .input-group input.errortextfield {
    border-color: #c00;
}

/* SSN Checkbox Styling */
.ssn-check {
    margin-top: 5px;
    padding-left: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 170px;
}

.ssn-check label {
    font-weight: normal;
    font-size: 13px;
    color: #4c4c4c;
    margin: 0;
}

.ssn-check input[type="checkbox"] {
    margin: 0;
}

/* Yearly Billing Checkbox */
.yearly-billing-checkbox-container {
    margin: 25px 0 15px 0;
    display: flex;
    justify-content: center;
}

.yearly-billing-checkbox-container label {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    line-height: 1.2;
}

.yearly-billing-checkbox-container input[type="checkbox"] {
    transform: scale(1.6);
    margin-right: 12px;
    margin-left: 0;
    flex-shrink: 0;
}

/* Card Images Container */
.card-images-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* Error Messages */
.error-message {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    border: 1px solid red;
    background-color: #fdd;
    color: #c00;
}

.error-message li {
    display: inline-block;
    padding: 5px 10px;
}

/* Primary User Info */
.primary-user-info {
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
}

/* Green Button Styling for Signup Forms */
.btn {
    display: block;
    margin: 20px auto 15px auto !important;
    background: linear-gradient(to bottom, #60801E 0%, #547119 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 13pt;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.btn:hover {
    background: linear-gradient(to bottom, #547119 0%, #486114 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.btn:active {
    background: #486114;
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(96, 128, 30, 0.35);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }
}
