/* prescription.css - Complete Fixed Version */

/* =================================
   NOTIFICATIONS
   ================================= */
.prescription-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100000;
    font-weight: 600;
    text-align: center;
    max-width: 90%;
    animation: slideDown 0.3s ease-out;
}

.prescription-notification.error {
    background: #dc3545;
}

.prescription-notification.warning {
    background: #ffc107;
    color: #000;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.prescription-notification.hide {
    animation: slideUp 0.3s ease-in;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

/* =================================
   MODAL STYLES
   ================================= */
#prescriptionModal {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#prescriptionModal[style*="display: flex"],
#prescriptionModal[style*="display: block"] {
    display: flex !important;
}

.prescription-modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    color: #333;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
}

.close:hover {
    color: #0073e6;
    background: rgba(255,255,255,1);
}

body.modal-open {
    overflow: hidden;
}

/* =================================
   BUTTON STYLES
   ================================= */
.prescription-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-size: 15px;
    margin-bottom: 10px;
    width: 100%;
    transition: all 0.3s ease;
}

.prescription-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

#skipPrescription {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-size: 15px;
    margin-top: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

#skipPrescription:hover {
    background: #5a6268;
}

#savePrescription {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

#savePrescription:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* =================================
   EYEWEAR BUTTONS - FIXED FOR MOBILE
   ================================= */
.eyewear-prescription-option {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    margin: 20px 0 !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

/* Both buttons side by side even on mobile */
.eyewear-prescription-option .eyewear-frame-btn,
.eyewear-prescription-option #proceed_with_lens {
    background: #e0a75d !important;
    background: linear-gradient(135deg, #e0a75d 0%, #d18f3b 100%) !important;
    border-radius: 25px !important;
    width: 48% !important;
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 48% !important;
    padding: 14px 10px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-shadow: 0 3px 8px rgba(224, 167, 93, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: block !important;
    line-height: 1.3 !important;
}

.eyewear-prescription-option .eyewear-frame-btn:hover,
.eyewear-prescription-option #proceed_with_lens:hover {
    background: #d18f3b !important;
    background: linear-gradient(135deg, #d18f3b 0%, #c17a29 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 12px rgba(209, 143, 59, 0.4) !important;
}

/* Hide default WooCommerce button for eyewear */
.eyewear-prescription-option ~ .single_add_to_cart_button:not(.eyewear-frame-btn) {
    display: none !important;
}

/* =================================
   FORM STYLES
   ================================= */
.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.form-row input:focus,
.form-row select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Side by side layout */
.side-by-side {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.side-by-side .form-row {
    flex: 1;
    min-width: calc(50% - 6px);
    margin-bottom: 0;
}

/* Lens and coating row */
.lens-coating-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.lens-coating-row .form-row {
    flex: 1;
    min-width: calc(50% - 6px);
    margin-bottom: 0;
}

/* =================================
   RX FIELDS STYLES - FIXED
   ================================= */
.rx-section {
    margin-bottom: 20px;
    padding: 0;
    width: 100%;
}

.rx-section h4 {
    margin-bottom: 12px;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 6px;
}

/* RX Row - Tight layout */
.rx-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    padding: 0;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.rx-row label {
    width: 70px;
    font-weight: 600;
    flex-shrink: 0;
    color: #333;
    margin-bottom: 0;
    font-size: 13px;
    text-align: right;
    padding-right: 5px;
}

.rx-row input[type="text"] {
    width: 65px;
    min-width: 65px;
    max-width: 65px;
    padding: 8px 6px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0;
}

.rx-row input[type="text"]:focus {
    border-color: #007cba;
    outline: none;
}

/* Eye label styling - Fix for the image issue */
.eye-label {
    width: 100px;
    font-weight: 600;
    color: #007cba;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    padding-right: 0;
}

/* =================================
   ADDITION & NEAR VISION FIX - SIDE BY SIDE
   ================================= */
.rx-section .side-by-side {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 15px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

.rx-section .side-by-side .form-row {
    flex: 1 !important;
    min-width: 0 !important;
    width: 50% !important;
    margin-bottom: 0 !important;
}

.rx-section .side-by-side label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
}

.rx-section .side-by-side input {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
}

/* =================================
   PRICE DISPLAY
   ================================= */
.price-display {
    margin-left: 8px;
    font-weight: 600;
    color: #007cba;
    font-size: 14px;
}

.total-price-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px;
    border-radius: 8px;
    margin: 22px 0;
    border-left: 4px solid #007cba;
    display: none;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

.price-item:last-child {
    border-bottom: none;
}

.price-total {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #007cba;
    font-weight: 700;
    font-size: 15px;
    color: #007cba;
}

.price-item .label {
    color: #495057;
    font-weight: 500;
}

.price-item .value {
    color: #212529;
    font-weight: 600;
}

.price-total .label {
    color: #007cba;
    font-weight: 600;
}

.price-total .value {
    color: #007cba;
    font-weight: 700;
}

/* =================================
   FILE UPLOAD
   ================================= */
#file-upload-status {
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

#file-upload-status.success {
    color: #28a745;
}

#file-upload-status.error {
    color: #dc3545;
}

/* =================================
   CART & ORDER STYLES
   ================================= */
.prescription-cart-action {
    margin: 8px 0;
}

.add-prescription,
.edit-prescription {
    color: #007cba;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border: 2px solid #007cba;
    border-radius: 4px;
    display: inline-block;
    margin: 2px 0;
    transition: all 0.3s ease;
    background: #fff;
}

.add-prescription:hover,
.edit-prescription:hover {
    background: #007cba;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.prescription-costs {
    margin-top: 5px;
}

.prescription-costs small {
    color: #666;
    font-size: 11px;
    font-weight: 500;
}

.prescription-order-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #007cba;
}

.prescription-order-details h4 {
    margin: 0 0 10px 0;
    color: #007cba;
    font-size: 16px;
}

.prescription-order-details h5 {
    margin: 15px 0 8px 0;
    color: #495057;
    font-size: 14px;
}

.prescription-order-details p {
    margin: 5px 0;
    font-size: 14px;
}

.prescription-order-details .rx-details {
    background: white;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.prescription-order-details pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 12px;
    margin: 0;
}

/* =================================
   NON-EYEWEAR PRODUCTS
   ================================= */
.single_add_to_cart_button:not(.eyewear-frame-btn) {
    display: block !important;
    background: #e0a75d !important;
    background: linear-gradient(135deg, #e0a75d 0%, #d18f3b 100%) !important;
    border-radius: 25px !important;
    color: white !important;
    padding: 12px 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 5px rgba(224, 167, 93, 0.3) !important;
}

.single_add_to_cart_button:not(.eyewear-frame-btn):hover {
    background: #d18f3b !important;
    background: linear-gradient(135deg, #d18f3b 0%, #c17a29 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(209, 143, 59, 0.4) !important;
}

form.cart:not(:has(.eyewear-prescription-option)) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 20px 0 !important;
}

.quantity {
    width: auto !important;
    margin: 0 !important;
}

.quantity .qty {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    padding: 10px !important;
    font-size: 15px !important;
    text-align: center !important;
    height: 42px !important;
    border-radius: 6px !important;
    border: 2px solid #ddd !important;
    background: white !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.quantity .qty:focus {
    border-color: #e0a75d !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(224, 167, 93, 0.1) !important;
}

.quantity .minus,
.quantity .plus {
    display: none !important;
}

.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity .qty[type=number] {
    -moz-appearance: textfield;
}

/* =================================
   MOBILE RESPONSIVE STYLES - FIXED FOR SPACING
   ================================= */
@media (max-width: 768px) {
    /* Modal mobile fixes */
    #prescriptionModal {
        padding: 15px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .prescription-modal-content {
        padding: 15px !important; /* Reduced padding */
        max-height: 85vh;
        margin: 0 auto;
        border-radius: 10px;
        width: calc(100% - 20px);
        overflow-x: hidden;
    }
    
    .close {
        top: 8px;
        right: 8px;
        font-size: 20px;
        width: 26px;
        height: 26px;
    }
    
    /* Eyewear buttons - keep side by side */
    .eyewear-prescription-option {
        gap: 8px !important;
        margin: 15px 0 !important;
    }
    
    .eyewear-prescription-option .eyewear-frame-btn,
    .eyewear-prescription-option #proceed_with_lens {
        width: 48% !important;
        max-width: 48% !important;
        padding: 12px 8px !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
        border-radius: 20px !important;
    }
    
    /* RX FIELDS MOBILE FIX - TIGHT LAYOUT */
    .rx-row {
        gap: 4px !important; /* Reduced gap */
        margin-bottom: 8px !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
        justify-content: flex-start !important;
        width: 100% !important;
        overflow-x: visible !important;
    }
    
    /* Reduce label width */
    .rx-row label {
        width: 60px !important; /* Reduced from 70px */
        min-width: 60px !important;
        font-size: 12px !important;
        text-align: right;
        padding-right: 3px !important;
    }
    
    /* Make inputs smaller */
    .rx-row input[type="text"] {
        width: 55px !important; /* Reduced from 65px */
        min-width: 55px !important;
        max-width: 55px !important;
        padding: 7px 4px !important; /* Reduced padding */
        font-size: 12px !important;
        margin-right: 0 !important;
    }
    
    /* Eye label adjustment */
    .eye-label {
        width: 80px; /* Reduced width */
        font-size: 12px;
        margin-bottom: 6px;
        padding-right: 0 !important;
    }
    
    /* Form adjustments */
    .form-row {
        margin-bottom: 15px;
    }
    
    .form-row label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .form-row input,
    .form-row select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Addition & Near Vision - stack on mobile */
    .rx-section .side-by-side {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .rx-section .side-by-side .form-row {
        width: 100% !important;
    }
    
    /* Side by side fields - stack on mobile */
    .lens-coating-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .lens-coating-row .form-row {
        min-width: 100%;
        width: 100%;
    }
    
    /* Buttons full width on mobile */
    .prescription-btn,
    #skipPrescription,
    #savePrescription {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Notification */
    .prescription-notification {
        width: 90%;
        font-size: 13px;
        padding: 10px 15px;
        top: 15px;
    }
    
    /* Regular products mobile */
    form.cart:not(:has(.eyewear-prescription-option)) {
        gap: 10px;
    }
    
    .quantity .qty {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        padding: 8px;
        font-size: 14px;
        height: 38px;
    }
    
    .single_add_to_cart_button:not(.eyewear-frame-btn) {
        padding: 10px 18px;
        font-size: 13px;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    #prescriptionModal {
        padding: 10px;
        padding-top: 30px;
    }
    
    .prescription-modal-content {
        padding: 12px !important; /* Even smaller padding */
        max-height: 90vh;
    }
    
    /* Eyewear buttons - smaller but still side by side */
    .eyewear-prescription-option {
        gap: 6px !important;
    }
    
    .eyewear-prescription-option .eyewear-frame-btn,
    .eyewear-prescription-option #proceed_with_lens {
        padding: 10px 6px !important;
        font-size: 12px !important;
        border-radius: 18px !important;
    }
    
    /* RX fields - even tighter on very small screens */
    .rx-row {
        gap: 3px !important;
    }
    
    .rx-row label {
        width: 50px !important; /* Further reduced */
        min-width: 50px !important;
        font-size: 11px !important;
        text-align: center; /* Center align on very small screens */
        padding-right: 0 !important;
    }
    
    .rx-row input[type="text"] {
        width: 48px !important; /* Further reduced */
        min-width: 48px !important;
        max-width: 48px !important;
        padding: 6px 3px !important;
        font-size: 11px !important;
    }
    
    .eye-label {
        width: 65px;
        font-size: 11px;
    }
    
    /* Form elements */
    .form-row label {
        font-size: 12px;
    }
    
    .form-row input,
    .form-row select {
        padding: 9px 10px;
        font-size: 13px;
    }
    
    /* Buttons */
    .prescription-btn,
    #skipPrescription,
    #savePrescription {
        padding: 11px 14px;
        font-size: 13px;
    }
    
    /* Regular products - stack vertically on very small */
    form.cart:not(:has(.eyewear-prescription-option)) {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .quantity .qty {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    .single_add_to_cart_button:not(.eyewear-frame-btn) {
        width: 100%;
        min-width: 100%;
        padding: 11px 15px;
    }
}

/* For very small screens - 360px and below */
@media (max-width: 360px) {
    .rx-row {
        gap: 2px !important;
    }
    
    .rx-row label {
        width: 45px !important;
        font-size: 10px !important;
    }
    
    .rx-row input[type="text"] {
        width: 45px !important;
        min-width: 45px !important;
        max-width: 45px !important;
        padding: 5px 2px !important;
        font-size: 10px !important;
    }
    
    .eye-label {
        width: 60px;
        font-size: 10px;
    }
    
    /* Stack eyewear buttons vertically on very small screens */
    .eyewear-prescription-option {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .eyewear-prescription-option .eyewear-frame-btn,
    .eyewear-prescription-option #proceed_with_lens {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 8px !important;
    }
}

/* =================================
   DESKTOP ENHANCEMENTS
   ================================= */
@media (min-width: 769px) {
    .eyewear-prescription-option .eyewear-frame-btn,
    .eyewear-prescription-option #proceed_with_lens {
        padding: 16px 15px !important;
        font-size: 15px !important;
    }
    
    .rx-row {
        gap: 8px;
    }
    
    .rx-row label {
        width: 75px;
        font-size: 14px;
    }
    
    .rx-row input[type="text"] {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
        padding: 9px 8px;
        font-size: 14px;
    }
}

/* =================================
   VARIABLE PRODUCT SUPPORT
   ================================= */
.variations_form .variations {
    margin-bottom: 20px !important;
}

.variations select {
    width: 100% !important;
    padding: 12px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px !important;
}

/* Ensure prescription modal displays properly */
body.modal-open #prescriptionModal {
    display: flex !important;
}

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
    .prescription-modal-content input,
    .prescription-modal-content select {
        font-size: 16px !important;
    }
}

/* Add this to the existing file - Update the side-by-side section */

/* =================================
   ADDITION & NEAR VISION - WITH "OR" TEXT
   ================================= */
.rx-section .side-by-side {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    position: relative !important;
}

.rx-section .side-by-side .form-row {
    flex: 1 !important;
    min-width: 0 !important;
    width: calc(50% - 20px) !important; /* Account for "Or" text */
    margin-bottom: 0 !important;
    position: relative !important;
}

.rx-section .side-by-side label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* "Or" text between fields */
.rx-section .side-by-side::after {
    content: "Or";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #6c757d;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 10;
    white-space: nowrap;
}

.rx-section .side-by-side input {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    text-align: center !important;
}

/* Mobile adjustments for the side-by-side layout */
@media (max-width: 768px) {
    .rx-section .side-by-side {
        flex-direction: row !important; /* Keep side by side on mobile */
        gap: 15px !important; /* Slightly more gap for "Or" text */
    }
    
    .rx-section .side-by-side::after {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .rx-section .side-by-side .form-row {
        width: calc(50% - 15px) !important;
    }
    
    .rx-section .side-by-side label {
        font-size: 12px !important;
    }
    
    .rx-section .side-by-side input {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .rx-section .side-by-side {
        gap: 12px !important;
    }
    
    .rx-section .side-by-side::after {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    .rx-section .side-by-side .form-row {
        width: calc(50% - 12px) !important;
    }
    
    .rx-section .side-by-side label {
        font-size: 11px !important;
    }
}

/* For very small screens - stack vertically */
@media (max-width: 360px) {
    .rx-section .side-by-side {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .rx-section .side-by-side::after {
        display: none; /* Hide "Or" when stacked */
    }
    
    .rx-section .side-by-side .form-row {
        width: 100% !important;
    }
}

/* =================================
   CHECKOUT PRICE BREAKDOWN
   ================================= */
.prescription-costs .price-breakdown {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.prescription-costs .price-breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.prescription-costs .price-breakdown-item:last-child {
    margin-bottom: 0;
    border-top: 1px solid #eee;
    padding-top: 3px;
    margin-top: 3px;
}

/* Add to prescription.css */

/* =================================
   ADDITION & NEAR VISION WITH "OR" TEXT - FIXED
   ================================= */
.form-row.side-by-side-with-or {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    position: relative !important;
}

.form-row-half {
    flex: 1 !important;
    min-width: 0 !important;
    width: calc(50% - 20px) !important;
    margin-bottom: 0 !important;
}

.form-row-half label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-align: center !important;
    color: #333 !important;
}

.form-row-half input {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    text-align: center !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}

.or-text {
    color: #6c757d !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    background: #f8f9fa !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    margin-bottom: 24px !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .form-row.side-by-side-with-or {
        gap: 8px !important;
    }
    
    .or-text {
        font-size: 11px !important;
        padding: 3px 6px !important;
        margin-bottom: 22px !important;
    }
    
    .form-row-half {
        width: calc(50% - 15px) !important;
    }
    
    .form-row-half label {
        font-size: 12px !important;
    }
    
    .form-row-half input {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .form-row.side-by-side-with-or {
        gap: 6px !important;
    }
    
    .or-text {
        font-size: 10px !important;
        padding: 2px 5px !important;
        margin-bottom: 20px !important;
    }
    
    .form-row-half {
        width: calc(50% - 12px) !important;
    }
}

/* Stack on very small screens */
@media (max-width: 360px) {
    .form-row.side-by-side-with-or {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .or-text {
        display: none !important;
    }
    
    .form-row-half {
        width: 100% !important;
    }
}

/* Clean up duplicate displays in cart and checkout */
.cart_item .prescription-costs,
.checkout .prescription-costs {
    display: none !important;
}

.woocommerce-checkout-review-order-table .price-breakdown {
    display: none !important;
}



/* Cart item display - cleaner */
.cart_item td.product-name dl.variation {
    margin: 0 !important;
}

.cart_item td.product-name dl.variation dt {
    font-weight: 600 !important;
    color: #333 !important;
    float: left !important;
    clear: left !important;
    margin-right: 5px !important;
}

.cart_item td.product-name dl.variation dd {
    margin: 0 0 3px 0 !important;
    color: #666 !important;
}

/* Checkout table cleanup */
.woocommerce-checkout-review-order-table tbody tr:has(.price-breakdown) {
    border-bottom: none !important;
}



/* Mobile adjustments */
@media (max-width: 768px) {
    .form-row.side-by-side-with-or {
        gap: 8px !important;
    }
    
    .or-text {
        font-size: 11px !important;
        padding: 3px 6px !important;
        margin-bottom: 22px !important;
    }
    
    .form-row-half {
        width: calc(50% - 15px) !important;
    }
    
    .form-row-half label {
        font-size: 12px !important;
    }
    
    .form-row-half input {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .form-row.side-by-side-with-or {
        gap: 6px !important;
    }
    
    .or-text {
        font-size: 10px !important;
        padding: 2px 5px !important;
        margin-bottom: 20px !important;
    }
    
    .form-row-half {
        width: calc(50% - 12px) !important;
    }
}

/* Stack on very small screens */
@media (max-width: 360px) {
    .form-row.side-by-side-with-or {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .or-text {
        display: none !important; /* Hide "Or" when stacked */
    }
    
    .form-row-half {
        width: 100% !important;
    }
}