/* --- 1. BASE MODAL & OVERLAY --- */
.tlw-modal { 
    position: fixed; z-index: 999999; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- 2. STEP 1: GATE MODAL (Add Lenses?) --- */
.tlw-gate-content { 
    background: #fff; padding: 40px; text-align: center; border-radius: 16px; 
    max-width: 450px; width: 90%; position: relative; box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}
.tlw-star-icon { font-size: 50px; color: #00d1ff; margin-bottom: 20px; }
.tlw-gate-content h2 { font-size: 28px; margin-bottom: 10px; font-weight: 600; }
.tlw-gate-content p { color: #666; font-size: 16px; margin-bottom: 30px; }
.tlw-gate-content .button.alt { 
    width: 100%; padding: 15px; background: #232f3e; color: #fff; border-radius: 30px; 
    font-weight: bold; border: none; cursor: pointer; transition: 0.3s;
}
.tlw-gate-content .button.alt:hover { background: #000; }
.tlw-link-btn { 
    display: block; margin-top: 20px; background: none; border: none; 
    color: #888; text-decoration: underline; cursor: pointer; font-size: 14px;
}

/* --- 3. STEP 2: COMPARISON WIZARD --- */
/* --- WIZARD MODAL STRUCTURE --- */
.tlw-wizard-content { 
    background: #fff; width: 95%; max-width: 1100px; border-radius: 12px; 
    overflow: hidden; max-height: 90vh; display: flex; flex-direction: column; 
}

/* Horizontal scrolling for cards */
.tlw-scroll { 
    display: flex; gap: 15px; padding: 20px; overflow-x: auto; 
    background: #f9f9f9; flex: 1; 
}

/* --- THE CARD --- */
.tlw-card { 
    min-width: 280px; background: #fff; border: 1px solid #eee; 
    border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; 
}

.tlw-card-top { 
    padding: 20px; text-align: center; border-bottom: 2px solid #5da6f0; 
    background: #fff; 
}

.tlw-card h4 { margin: 0; font-size: 14px; color: #333; text-transform: uppercase; }
.tlw-card .price { font-size: 22px; font-weight: bold; margin: 10px 0; color: #000; }

.tlw-select { 
    background: #232f3e; color: #fff; border: none; padding: 10px; 
    border-radius: 25px; cursor: pointer; font-weight: bold; width: 100%; 
}
.tlw-modal-header { 
    padding: 15px 25px; border-bottom: 1px solid #eee; display: flex; 
    justify-content: space-between; align-items: center; background: #fff;
    overflow-x: auto;
    overflow-y: hidden;
}
.tlw-tabs { 
    display: flex; 
    gap: 12px; 
    overflow-x: auto; /* Allow tabs to scroll on very small screens */
    padding-bottom: 5px;
}
.tlw-tab { 
    cursor: pointer; border: 1px solid #ddd; background: #fff; padding: 10px 22px; 
    border-radius: 25px; font-weight: 500; transition: 0.2s; white-space: nowrap;
}
.tlw-tab.active { background: #5da6f0; color: #fff; border-color: #5da6f0; }

/* --- INTERNAL FEATURES LIST --- */
.tlw-card-features { padding: 10px 15px; background: #fff; }

.tlw-feature-row { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px 0; border-bottom: 1px solid #f2f2f2; 
}

.tlw-feature-row:last-child { border-bottom: none; }

.feature-label { font-size: 13px; color: #666; font-weight: 500; }

.feature-icon { 
    font-size: 16px; font-weight: bold; 
    color: #00bfa5; /* Green color for ticks */
}

/* Gray color for crosses */
.tlw-feature-row:has(.feature-icon:contains('×')) .feature-icon {
    color: #ccc;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 600px) {
    .tlw-scroll { 
        flex-direction: column; /* Stack cards vertically on small phones */
        overflow-y: auto;
    }
    .tlw-card { min-width: 100%; width: 100%; }
}

/* --- 4. THE COMPARISON TABLE LAYOUT --- */
.tlw-flex { 
    display: flex; 
    flex: 1; 
    overflow-x: auto; /* Enable horizontal scroll for the whole comparison area */
    position: relative;
}

/* LEFT SIDEBAR (Labels & Logo) */
.tlw-labels { 
    width: 240px; 
    border-right: 1px solid #eee; 
    flex-shrink: 0; 
    background: #fff; 
    position: sticky; /* Make labels stay visible while scrolling cards */
    left: 0;
    z-index: 10;
}

.tlw-labels-header {
    height: 190px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-bottom: 1px solid #f0f0f0; margin-bottom: 10px; background: #fff;
}

/* Icons */
.tlw-lens-stack { position: relative; width: 80px; height: 60px; margin-bottom: 20px; }
.tlw-lens-shape {
    position: absolute; width: 65px; height: 48px; border: 2px solid #00d1ff;
    border-radius: 12px 12px 18px 18px; background: #fff; opacity: 0.3;
}
.tlw-lens-shape:nth-child(1) { top: -10px; left: -10px; opacity: 0.2; }
.tlw-lens-shape:nth-child(2) { top: -5px; left: -5px; opacity: 0.5; }
.tlw-lens-shape:nth-child(3) { top: 0; left: 0; opacity: 1; border-width: 3px; background: linear-gradient(135deg, #fff 0%, #e0faff 100%); }

.tlw-coating-text { text-align: center; font-weight: bold; line-height: 1.2; }
.tlw-coating-small { font-size: 11px; color: #aaa; letter-spacing: 1px; }
.tlw-coating-main { font-size: 16px; color: #333; }

/* Labels styling */
.tlw-l { 
    height: 48px; line-height: 1.2; padding: 0 20px; font-size: 14px; 
    color: #555; border-bottom: 1px solid #f9f9f9; font-weight: 500;
    display: flex; align-items: center; /* Center text vertically */
}

/* RIGHT SIDEBAR (Scrolling Cards) */
.tlw-scroll { 
    display: flex; 
    gap: 20px; 
    padding: 20px; 
    background: #fff; 
    flex-grow: 1;
    overflow: scroll;
}

.tlw-card { min-width: 280px; border: 1px solid #eee; border-radius: 12px; text-align: center; transition: 0.3s; }
.tlw-card:hover { border-color: #5da6f0; box-shadow: 0 8px 25px rgba(0,0,0,0.1); }

.tlw-card-top { 
    padding: 25px; background: #fdfdfd; border-bottom: 3px solid #5da6f0; 
    height: 190px; border-radius: 12px 12px 0 0; display: flex; flex-direction: column; justify-content: space-between;
}

.tlw-card.tlw-card-has-image .tlw-card-top {
    height:auto;
}
.tlw-card h4 { margin: 0; font-size: 18px; color: #232f3e; text-transform: uppercase; }
.tlw-card .price { font-size: 24px; font-weight: 800; color: #000; }

.tlw-r { height: 48px; line-height: 48px; border-bottom: 1px solid #f9f9f9; font-size: 20px; font-weight: bold; }
.tlw-check { color: #00bfa5; }
.tlw-cross { color: #ddd; font-weight: normal; }

.tlw-select { 
    background: #232f3e; color: #fff; border: none; padding: 12px; 
    border-radius: 25px; cursor: pointer; font-weight: bold; width: 100%; transition: 0.2s;
}
.tlw-select:hover { background: #000; transform: scale(1.02); }

/* Close Button */
.tlw-close { font-size: 30px; cursor: pointer; color: #bbb; transition: 0.2s; }
.tlw-close:hover { color: #333; }

/* --- 5. MOBILE RESPONSIVENESS UPDATES --- */
@media (max-width: 768px) {
    /* Ensure the modal content doesn't hit screen edges */
    .tlw-wizard-content { 
                width: 85%;
        height: auto;
        max-height: 90vh;
        border-radius: 8px;
    }

    /* Force horizontal layout instead of vertical stack */
    .tlw-scroll { 
        display: flex !important;
        flex-direction: row !important; /* Keep cards side-by-side */
        overflow-x: auto !important;   /* Enable horizontal swiping */
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 15px;
    }

    /* Keep the labels sidebar visible and sticky on the left */
    .tlw-labels { 
        width: 130px; /* Slimmer for mobile */
        position: sticky;
        left: 0;
        z-index: 10;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }

    /* Scale down the logo area for mobile */
    .tlw-labels-header { height: 150px; }
    .tlw-lens-stack { transform: scale(0.6); margin-bottom: 0; }
    .tlw-coating-main { font-size: 11px; }

    /* Adjust label and row heights to stay aligned */
    .tlw-l { 
        font-size: 10px; 
        padding: 0 8px; 
        height: 48px; 
        line-height: 1.2;
    }

    /* Size cards so at least one and a half are visible (invites swiping) */
    .tlw-card { 
        min-width: 200px; 
        flex-shrink: 0; 
    }
    
    .tlw-card-top { height: 150px; padding: 15px; }
    .tlw-card h4 { font-size: 13px; }
    .tlw-card .price { font-size: 18px; }
    
    /* Ensure the close button stays on top and visible */
    .tlw-close { 
        position: absolute;
        right: 10px;
        top: 10px;
        z-index: 20;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
}

div#tlw-wizard-modal span.tlw-close {
    top: 0;
}


div#tlw-wizard-modal .tlw-modal-header span.tlw-close
 {
    font-size: 50px;
    cursor: pointer;
    color: #bbb;
    transition: 0.2s;
    position: absolute;
    top: -20px;
    right: 230px;
    color: #fff ! IMPORTANT;
    background: transparent;
}

@media screen and (max-width:768px){
    div#tlw-wizard-modal .tlw-modal-header span.tlw-close {
    right: 0;
    top: 0;
}
}

/* --- WIZARD STEP CONTAINERS --- */
.tlw-wizard-step {
    background: #fff;
    overflow:auto;
}

.tlw-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.tlw-step-header h3 {
    margin: 0;
    font-size: 20px;
    color: #232f3e;
}

/* --- BACK BUTTON --- */
.tlw-back-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: 0.2s;
}

.tlw-back-btn:hover {
    background: #232f3e;
    color: #fff;
    border-color: #232f3e;
}

/* --- THICKNESS CARD OPTIONS --- */
.tlw-thickness-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tlw-thick-option {
    display: flex;
    align-items: center;
    padding: 18px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

/* Hide the actual radio input */
.tlw-thick-option input[type="radio"] {
    display: none;
}

/* Active State (Blue Border like Nova) */
.tlw-thick-option.active {
    border-color: #5da6f0;
    background-color: #f0faff;
}

.tlw-thick-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-left: 10px;
}

.tlw-thick-title {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.tlw-thick-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.tlw-thick-price {
    font-weight: 800;
    font-size: 16px;
    color: #000;
    min-width: 80px;
    text-align: right;
}

/* Blue checkmark indicator for active card */
.tlw-thick-option.active::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    background: #5da6f0;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* --- PRESCRIPTION UPLOAD AREA --- */
.tlw-prescription-upload-box {
    border: 2px dashed #ccc;
    padding: 40px 20px;
    text-align: center;
    border-radius: 15px;
    background: #fafafa;
    margin-bottom: 20px;
}

.tlw-upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.tlw-secondary-btn {
    background: #fff;
    border: 1px solid #232f3e;
    color: #232f3e;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.tlw-secondary-btn:hover {
    background: #232f3e;
    color: #fff;
}

/* --- PRIMARY BUTTON (Next/Add to Cart) --- */
.tlw-primary-btn {
    width: 100%;
    padding: 15px;
    background: #232f3e;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.tlw-primary-btn:hover {
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tlw-primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.tlw-lightbox {
    color: #5da6f0 !important;
    text-decoration: underline !important;
    font-weight: bold;
    cursor: pointer;
}

.tlw-lightbox:hover {
    color: #232f3e !important;
}

div#tlw-step-thickness {
    padding: 20px;
        overflow: scroll;
}

div#tlw-step-prescription {
    padding: 20px;
        overflow: scroll;
}

/* Styling for disabled lens type tabs */
.tlw-tab-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #aaa !important;
}

/* Ensure the active tab remains highlighted but muted if disabled */
.tlw-tab.active.tlw-tab-disabled {
    background-color: #5da6f0; /* Keep the brand color */
    opacity: 0.7;
    color: #fff !important;
}

button.tlw-tab.active.tlw-tab-disabled {
    background: #5da6f0 !important;
    opacity: 1;
}

button.tlw-select-pkg {
    border-radius: 50px;
}

/* Styling for Packages with Images (Titan Look) */

.tlw-modal .tlw-card-has-image {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.tlw-modal .tlw-card-header {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tlw-modal .tlw-pkg-card-img {
    max-width: 100%;
    height: 120px; /* Adjust height based on your desire */
    object-fit: contain; /* ensures image doesn't stretch weirdly */
    margin-bottom: 15px;
}

.tlw-modal .tlw-card-header h4 {
    color: #007cba;
    font-size: 18px;
    margin: 0 0 10px 0;
}

.tlw-modal .tlw-card-header .price {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.tlw-modal .tlw-card-header .tlw-select-pkg {
    display: block;
    width: 100%;
    margin-top: auto; /* Pushes button to the bottom of the header block */
}

.tlw-modal .tlw-card-features {
    padding: 15px 20px;
    background-color: #f9f9f9;
}

.card {
      max-width: 100%;
   
}