/**
 * FrameFiesta Lens Selection Wizard Styles
 * Version: 1.0.0
 *
 * Sections:
 * 1. Modal Overlay
 * 2. Wizard Container
 * 3. Step Indicator
 * 4. Step Content
 * 5. Selection Cards
 * 6. Prescription Form
 * 7. Review Step
 * 8. Buttons & Navigation
 * 9. OCR / Upload
 * 10. Mobile Responsive
 */

/* ============================================
   1. MODAL OVERLAY
   ============================================ */

.ff-wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.ff-wizard-overlay.active {
    display: flex;
    opacity: 1;
}

/* ============================================
   2. WIZARD CONTAINER
   ============================================ */

.ff-wizard {
    background: #fff;
    border-radius: 16px;
    width: 720px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: ffWizardSlideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes ffWizardSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ff-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.ff-wizard-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.ff-wizard-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #515151;
    font-size: 18px;
    line-height: 1;
}

.ff-wizard-close:hover {
    background: #e0e0e0;
}

.ff-wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.ff-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
    background: #fafafa;
}

/* ============================================
   3. STEP INDICATOR
   ============================================ */

.ff-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px 0;
    flex-shrink: 0;
    margin-top: 16px;
}

.ff-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s;
}

.ff-step-dot.active {
    background: var(--ff-accent, #3B6BE5);
    width: 28px;
    border-radius: 5px;
}

.ff-step-dot.completed {
    background: var(--ff-accent, #3B6BE5);
}

.ff-step-label {
    display: none;
}

/* Progress bar alternative */
.ff-step-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 16px 24px 0;
}

.ff-step-progress-segment {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: background 0.3s;
}

.ff-step-progress-segment.completed,
.ff-step-progress-segment.active {
    background: var(--ff-accent, #3B6BE5);
}

/* ============================================
   4. STEP CONTENT
   ============================================ */

.ff-step {
    display: none;
}

.ff-step.active {
    display: block;
    animation: ffStepFade 0.3s ease-out;
}

@keyframes ffStepFade {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ff-step-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.ff-step-subtitle {
    font-size: 14px;
    color: #767676;
    margin: 0 0 20px;
}

/* ============================================
   5. SELECTION CARDS
   ============================================ */

.ff-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ff-card-grid--addons {
    grid-template-columns: repeat(3, 1fr);
}

.ff-option-card {
    position: relative;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    text-align: center;
}

.ff-option-card:hover {
    border-color: #c0c8d4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ff-option-card.selected {
    border-color: var(--ff-accent, #3B6BE5);
    background: #f0f4ff;
    box-shadow: 0 0 0 1px var(--ff-accent, #3B6BE5);
}

.ff-option-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* Card check indicator */
.ff-option-card.selected::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: var(--ff-accent, #3B6BE5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
}

.ff-option-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.ff-option-card-name {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.ff-option-card-price {
    font-size: 13px;
    color: var(--ff-accent, #3B6BE5);
    font-weight: 500;
}

.ff-option-card-price.included {
    color: #28a745;
}

.ff-option-card-desc {
    font-size: 12px;
    color: #767676;
    margin-top: 4px;
    line-height: 1.4;
}

/* Tooltip for quick tips */
.ff-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e8eaed;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #767676;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
}

.ff-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 220px;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    text-align: left;
}

.ff-tip:hover::after {
    opacity: 1;
}

/* Learn more link */
.ff-learn-more {
    display: inline-block;
    font-size: 12px;
    color: var(--ff-accent, #3B6BE5);
    text-decoration: none;
    margin-top: 6px;
}

.ff-learn-more:hover {
    text-decoration: underline;
}

/* Mutual exclusion notice */
.ff-exclusive-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #767676;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 12px;
}

.ff-exclusive-notice svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================
   5b. UPGRADE CARDS (Step 2)
   ============================================ */

.ff-upgrade-group {
    margin-bottom: 20px;
}

.ff-upgrade-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.ff-upgrade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.ff-upgrade-card {
    position: relative;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ff-upgrade-card:hover {
    border-color: #c0c8d4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ff-upgrade-card.selected {
    border-color: var(--ff-accent, #3B6BE5);
    background: #f0f4ff;
    box-shadow: 0 0 0 1px var(--ff-accent, #3B6BE5);
}

.ff-upgrade-card.selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--ff-accent, #3B6BE5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.ff-upgrade-card-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
}

.ff-upgrade-card-price {
    font-size: 13px;
    color: var(--ff-accent, #3B6BE5);
    font-weight: 500;
}

.ff-upgrade-card-price.included {
    color: #28a745;
}

.ff-upgrade-note {
    font-size: 12px;
    color: #767676;
    font-style: italic;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ff-upgrade-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px;
}

.ff-upgrade-select:focus {
    outline: none;
    border-color: var(--ff-accent, #3B6BE5);
    box-shadow: 0 0 0 3px rgba(59, 107, 229, 0.12);
}

.ff-no-upgrades {
    text-align: center;
    color: #767676;
    font-size: 14px;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Mobile — upgrade cards */
@media (max-width: 768px) {
    .ff-upgrade-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ff-upgrade-card {
        padding: 12px;
    }

    .ff-upgrade-card-name {
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    .ff-upgrade-cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   6. PRESCRIPTION FORM
   ============================================ */

/* Tab navigation within Step 3 */
.ff-rx-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    gap: 0;
}

.ff-rx-tab {
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #767676;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.ff-rx-tab:hover {
    color: #1a1a2e;
}

.ff-rx-tab.active {
    color: var(--ff-accent, #3B6BE5);
    border-bottom-color: var(--ff-accent, #3B6BE5);
    font-weight: 600;
}

.ff-rx-panel {
    display: none;
}

.ff-rx-panel.active {
    display: block;
}

/* Prescription table */
.ff-rx-table {
    width: 100%;
    margin-bottom: 16px;
}

.ff-rx-table th {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 4px 8px;
    text-align: left;
}

.ff-rx-table td {
    padding: 4px;
}

.ff-rx-table .ff-rx-eye-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    padding-right: 12px;
    white-space: nowrap;
    width: 60px;
}

.ff-rx-table select,
.ff-rx-table input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    background: #fff;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.ff-rx-table select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 28px;
}

.ff-rx-table select:focus,
.ff-rx-table input:focus {
    outline: none;
    border-color: var(--ff-accent, #3B6BE5);
    box-shadow: 0 0 0 3px rgba(59, 107, 229, 0.12);
}

.ff-rx-table select.has-value {
    color: #1a1a2e;
    font-weight: 500;
}

.ff-rx-table select.warning {
    border-color: #f5a623;
    background-color: #fffbf0;
}

.ff-rx-table select.error,
.ff-rx-table input.error {
    border-color: #e94560;
    background-color: #fff5f7;
}

/* PD section */
.ff-rx-pd-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 0;
}

.ff-rx-pd-section label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.ff-rx-pd-section input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    text-align: center;
}

.ff-rx-pd-section input:focus {
    outline: none;
    border-color: var(--ff-accent, #3B6BE5);
    box-shadow: 0 0 0 3px rgba(59, 107, 229, 0.12);
}

.ff-rx-pd-dual {
    display: none;
    align-items: center;
    gap: 8px;
}

.ff-rx-pd-dual.active {
    display: flex;
}

.ff-rx-pd-single.hidden {
    display: none;
}

.ff-rx-pd-toggle {
    font-size: 13px;
    color: var(--ff-accent, #3B6BE5);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ff-rx-pd-toggle input[type="checkbox"] {
    accent-color: var(--ff-accent, #3B6BE5);
}

/* Prism section (expandable) */
.ff-rx-prism-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ff-accent, #3B6BE5);
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
    border: none;
    background: none;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

.ff-rx-prism-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.ff-rx-prism-toggle.open svg {
    transform: rotate(90deg);
}

.ff-rx-prism-fields {
    display: none;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ff-rx-prism-fields.active {
    display: block;
}

.ff-rx-prism-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ff-rx-prism-row:last-child {
    margin-bottom: 0;
}

.ff-rx-prism-row label {
    font-size: 13px;
    font-weight: 600;
    width: 60px;
    flex-shrink: 0;
}

.ff-rx-prism-row input,
.ff-rx-prism-row select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 13px;
}

/* Validation messages */
.ff-rx-validation {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 8px;
}

.ff-rx-validation.warning {
    color: #856404;
    background: #fff3cd;
}

.ff-rx-validation.error {
    color: #721c24;
    background: #f8d7da;
}

.ff-rx-validation.info {
    color: #1e40af;
    background: #f0f7ff;
    border-left: 3px solid #2563eb;
}

.ff-review-pd-pending {
    color: #1e40af;
    font-style: italic;
}

/* ============================================
   LEGAL DISCLAIMER
   ============================================ */

.ff-rx-disclaimer {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.ff-rx-disclaimer label {
    display: flex;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #515151;
}

.ff-rx-disclaimer input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--ff-accent, #3B6BE5);
    width: 16px;
    height: 16px;
}

.ff-rx-disclaimer ul {
    margin: 4px 0 0;
    padding-left: 0;
    list-style: none;
}

.ff-rx-disclaimer ul li {
    padding-left: 0;
    margin-bottom: 2px;
}

.ff-rx-disclaimer ul li::before {
    content: '\2022 ';
    color: #767676;
}

/* ============================================
   7. REVIEW STEP
   ============================================ */

.ff-review-section {
    margin-bottom: 20px;
}

.ff-review-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #767676;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ff-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ff-review-item:last-child {
    border-bottom: none;
}

.ff-review-item-label {
    font-size: 14px;
    color: #515151;
}

.ff-review-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.ff-review-rx-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #1a1a2e;
}

.ff-review-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 2px solid #1a1a2e;
    margin-top: 12px;
}

.ff-review-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.ff-review-total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--ff-accent, #3B6BE5);
}

.ff-review-edit {
    font-size: 12px;
    color: var(--ff-accent, #3B6BE5);
    cursor: pointer;
    text-decoration: none;
    margin-left: 8px;
}

.ff-review-edit:hover {
    text-decoration: underline;
}

/* ============================================
   8. BUTTONS & NAVIGATION
   ============================================ */

.ff-wizard-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ff-wizard-btn-back {
    background: transparent;
    color: #767676;
    padding-left: 0;
}

.ff-wizard-btn-back:hover {
    color: #1a1a2e;
}

.ff-wizard-btn-back svg {
    width: 16px;
    height: 16px;
}

.ff-wizard-btn-next {
    background: var(--ff-accent, #3B6BE5);
    color: #fff;
}

.ff-wizard-btn-next:hover {
    background: var(--ff-accent-hover, #2D56C8);
}

.ff-wizard-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ff-wizard-btn-next svg {
    width: 16px;
    height: 16px;
}

.ff-wizard-btn-cart {
    background: #28a745;
    color: #fff;
    font-size: 16px;
    padding: 12px 32px;
}

.ff-wizard-btn-cart:hover {
    background: #218838;
}

.ff-wizard-btn-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Price chip in footer */
.ff-wizard-price {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.ff-wizard-price small {
    font-size: 12px;
    font-weight: 400;
    color: #767676;
}

/* ============================================
   9. OCR / UPLOAD
   ============================================ */

.ff-ocr-upload-area {
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.ff-ocr-upload-area:hover {
    border-color: var(--ff-accent, #3B6BE5);
    background: #f0f4ff;
}

.ff-ocr-upload-area.dragover {
    border-color: var(--ff-accent, #3B6BE5);
    background: #f0f4ff;
}

.ff-ocr-upload-area svg {
    width: 40px;
    height: 40px;
    color: #999;
    margin-bottom: 12px;
}

.ff-ocr-upload-area p {
    font-size: 14px;
    color: #515151;
    margin: 0 0 8px;
}

.ff-ocr-upload-area small {
    font-size: 12px;
    color: #999;
}

.ff-ocr-upload-area input[type="file"] {
    display: none;
}

/* OCR processing state */
.ff-ocr-processing {
    text-align: center;
    padding: 40px 20px;
}

.ff-ocr-processing .ff-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--ff-accent, #3B6BE5);
    border-radius: 50%;
    animation: ffSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes ffSpin {
    to { transform: rotate(360deg); }
}

.ff-ocr-processing p {
    font-size: 14px;
    color: #515151;
}

/* OCR result */
.ff-ocr-result {
    padding: 12px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ff-ocr-result p {
    font-size: 13px;
    color: #2d6a4f;
    margin: 0;
}

.ff-ocr-error {
    padding: 12px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ff-ocr-error p {
    font-size: 13px;
    color: #c53030;
    margin: 0;
}

/* Upload tab — custom upload dropzone */
.ff-upload-rx-wrapper {
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ff-upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.ff-upload-dropzone:hover {
    border-color: #2563eb;
    background: #f0f7ff;
}
.ff-upload-dropzone.ff-dragover {
    border-color: #2563eb;
    background: #e0edff;
}
.ff-upload-icon {
    color: #94a3b8;
    margin-bottom: 8px;
}
.ff-upload-label {
    font-size: 14px;
    color: #475569;
    margin: 0;
}
.ff-upload-browse {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
}
.ff-upload-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 0;
}
.ff-upload-preview {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
}
.ff-upload-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #1e40af;
    font-weight: 500;
}
.ff-upload-remove {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 8px;
}
.ff-upload-remove:hover {
    text-decoration: underline;
}

/* ============================================
   10. MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ff-wizard-overlay {
        background: #fff;
        overflow-y: auto;
        align-items: flex-start;
    }

    .ff-wizard {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }

    .ff-wizard-body {
        padding: 16px;
        flex: 0 1 auto;
        overflow-y: visible;
    }

    .ff-wizard-header {
        padding: 16px;
    }

    .ff-wizard-footer {
        position: sticky;
        bottom: 0;
        flex-direction: column;
        padding: 12px 16px;
        gap: 4px;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
        z-index: 10;
    }

    .ff-wizard-footer .ff-wizard-price {
        font-size: 18px;
        text-align: center;
    }

    .ff-wizard-footer .ff-wizard-btn-next,
    .ff-wizard-footer .ff-wizard-btn-cart {
        width: 100%;
        justify-content: center;
        padding: 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    .ff-wizard-footer .ff-wizard-btn-back {
        position: absolute;
        top: -44px;
        left: 8px;
        background: rgba(255,255,255,0.9);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    .ff-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ff-card-grid--addons {
        grid-template-columns: repeat(2, 1fr);
    }

    .ff-option-card {
        padding: 14px 10px;
    }

    .ff-option-card-name {
        font-size: 13px;
    }

    /* Rx table: stack OD/OS vertically */
    .ff-rx-table {
        display: block;
    }

    .ff-rx-table thead {
        display: none;
    }

    .ff-rx-table tbody {
        display: block;
    }

    .ff-rx-table tr {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .ff-rx-table .ff-rx-eye-label {
        grid-column: 1 / -1;
        width: auto;
        font-size: 14px;
        margin-bottom: 4px;
    }

    .ff-rx-table td {
        padding: 2px 0;
    }

    .ff-rx-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: #767676;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .ff-rx-pd-section {
        flex-wrap: wrap;
    }

    .ff-rx-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ff-rx-tab {
        padding: 8px 14px;
        font-size: 12px;
    }

    .ff-step-title {
        font-size: 18px;
    }

    .ff-review-total-price {
        font-size: 20px;
    }

    .ff-tip::after {
        width: 180px;
        font-size: 11px;
    }
}

@media (max-width: 375px) {
    .ff-card-grid {
        grid-template-columns: 1fr;
    }

    .ff-card-grid--addons {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   11. GROUPED SELECTION CARDS (Step 1)
   ============================================ */

.ff-group-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ff-group-card {
    position: relative;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.ff-group-card:hover {
    border-color: #c0c8d4;
}

.ff-group-card.expanded {
    border-color: var(--ff-accent, #3B6BE5);
    box-shadow: 0 2px 12px rgba(59, 107, 229, 0.1);
}

.ff-group-card.has-selection {
    border-color: var(--ff-accent, #3B6BE5);
    box-shadow: 0 0 0 1px var(--ff-accent, #3B6BE5);
}

.ff-group-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.ff-group-card-header:hover {
    background: #f8f9fa;
}

.ff-group-card.has-selection > .ff-group-card-header {
    background: #f0f4ff;
}

.ff-group-card-icon {
    flex-shrink: 0;
    color: var(--ff-accent, #3B6BE5);
    display: flex;
    align-items: center;
}

.ff-group-card-info {
    flex: 1;
    min-width: 0;
}

.ff-group-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.ff-group-card-desc {
    font-size: 13px;
    color: #767676;
    line-height: 1.4;
}

.ff-group-card-right {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ff-group-card-price {
    font-size: 13px;
    color: var(--ff-accent, #3B6BE5);
    font-weight: 500;
    white-space: nowrap;
}

.ff-group-card-arrow {
    transition: transform 0.3s;
    color: #767676;
    display: flex;
    align-items: center;
}

.ff-group-card.expanded .ff-group-card-arrow {
    transform: rotate(180deg);
}

/* Sub-options (hidden by default, expand on click) */
.ff-group-card-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-top: 0 solid #f0f0f0;
}

.ff-group-card.expanded .ff-group-card-options {
    max-height: 600px;
    border-top-width: 1px;
}

.ff-sub-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 14px 68px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.ff-sub-option:last-child {
    border-bottom: none;
}

.ff-sub-option:hover {
    background: #f8f9fa;
}

.ff-sub-option.selected {
    background: #f0f4ff;
}

.ff-sub-option.selected::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--ff-accent, #3B6BE5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.ff-sub-option-info {
    flex: 1;
    min-width: 0;
}

.ff-sub-option-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
}

.ff-sub-option-desc {
    font-size: 12px;
    color: #767676;
    margin-top: 2px;
}

.ff-sub-option-price {
    font-size: 13px;
    color: var(--ff-accent, #3B6BE5);
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 16px;
}

.ff-sub-option-price.included {
    color: #28a745;
}

/* Single-option group (e.g., Readers) */
.ff-group-single.selected {
    border-color: var(--ff-accent, #3B6BE5);
    background: #f0f4ff;
    box-shadow: 0 0 0 1px var(--ff-accent, #3B6BE5);
}

.ff-group-single.selected::after {
    content: '';
    position: absolute;
    top: 18px;
    right: 18px;
    width: 22px;
    height: 22px;
    background: var(--ff-accent, #3B6BE5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Mobile responsive — grouped cards */
@media (max-width: 768px) {
    .ff-group-card-header {
        padding: 16px;
        gap: 12px;
    }

    .ff-group-card-title {
        font-size: 15px;
    }

    .ff-group-card-desc {
        font-size: 12px;
    }

    .ff-sub-option {
        padding: 12px 16px 12px 52px;
    }

    .ff-sub-option.selected::before {
        left: 20px;
        width: 18px;
        height: 18px;
    }

    .ff-group-card-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ─── Section 7: Demo Lens Warning ─── */

.ff-demo-warning {
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.ff-demo-warning strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #b8860b;
    margin-bottom: 6px;
}

.ff-demo-warning p {
    font-size: 13px;
    color: #5d4e37;
    line-height: 1.5;
    margin: 0;
}

.ff-review-demo-notice {
    font-size: 12px;
    color: #b8860b;
    background: #fff8e1;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    line-height: 1.4;
}

/* ─── Section 8: Frame Only Inline Warning ─── */

.ff-frame-only-inline {
    width: 100%;
    margin-top: 8px;
    animation: ffSlideDown 0.2s ease;
}

@keyframes ffSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ff-frame-only-inline .ff-demo-warning {
    margin-bottom: 12px;
}

.ff-frame-only-confirm {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: #3B6BE5;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}

.ff-frame-only-confirm:hover {
    background: #2f5ac4;
}

/* ============================================
   SEND LATER PANEL (Step 3)
   ============================================ */
.ff-rx-later-info {
    text-align: center;
    padding: 32px 16px;
}
.ff-rx-later-icon {
    color: var(--ff-primary, #3b6de7);
    margin-bottom: 16px;
}
.ff-rx-later-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a202c;
}
.ff-rx-later-info p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 8px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.ff-rx-later-note {
    font-size: 13px !important;
    color: #805ad5 !important;
    font-weight: 500;
    background: #faf5ff;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 8px !important;
}

/* ============================================
   RX LATER CONFIRMATION POPUP
   ============================================ */
.ff-rx-later-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000001;
    animation: ffFadeIn 0.2s ease;
}
.ff-rx-later-popup {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', sans-serif;
}
.ff-rx-later-popup h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 12px;
}
.ff-rx-later-popup p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 12px;
}
.ff-rx-later-popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.ff-rx-later-popup-btn {
    flex: 1;
    padding: 10px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.ff-rx-later-popup-back {
    background: #edf2f7;
    color: #4a5568;
}
.ff-rx-later-popup-back:hover {
    background: #e2e8f0;
}
.ff-rx-later-popup-confirm {
    background: var(--ff-primary, #3b6de7);
    color: #fff;
}
.ff-rx-later-popup-confirm:hover {
    background: #2f5ac4;
}

/* ─── Lenses-Only: photo of your frames (Review step) ─── */
.ff-frames-section {
    background: #f8faff;
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    padding: 16px;
}
.ff-frames-req {
    color: #e11d48;
    font-weight: 700;
}
.ff-frames-instruction {
    margin: 4px 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}
.ff-frames-skip-row {
    margin-top: 12px;
    text-align: center;
}
.ff-frames-skip-btn {
    background: none;
    border: none;
    color: var(--ff-accent, #3B6BE5);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
}
.ff-frames-skip-btn:hover {
    color: #1a1a2e;
}
.ff-frames-skip-note {
    background: #fff8e6;
    border: 1px solid #f5d98a;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b5418;
    text-align: left;
}
.ff-frames-undo {
    display: inline;
    background: none;
    border: none;
    color: var(--ff-accent, #3B6BE5);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0 0 0 4px;
}
.ff-frames-camera-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 16px;
    background: var(--ff-accent, #3B6BE5);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ff-frames-camera-btn:hover {
    background: #2f5ac4;
}
