/* Apply WooCommerce button style to our lens selector button */

.glimpse-lw-select {
    border: 1px solid #c59752 !important;
    color: #c59752 !important;
    text-transform: uppercase;
    font-weight: 500;
    padding: 11px 25px;
    font-size: 16px;
    line-height: 24px;
    border-radius: 0px;
    display: inline-block;
    cursor: pointer;
    z-index: 1;
    position: relative;
    font-family: var(--bzo-body_typo-font-family);
    overflow: hidden;
    transition: .3s;
    background: white;
    position: relative;
    overflow: hidden;
}

.glimpse-lw-select:hover {
    background: #c59752 !important;
    color: white !important;
    border-color: #c59752 !important;
}

/* Sidebar container */
#glimpse-lw-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.glimpse-lw-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.glimpse-lw-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    font-family: var(--bzo-body_typo-font-family);
}

/* Inner content */
.glimpse-lw-inner {
    padding: 20px;
    text-align: left;
}

.glimpse-lw-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: bold;
    color: #c59752;
    text-align: left;
}

/* Steps & cards */
.glimpse-step-sub {
    margin-bottom: 15px;
    font-weight: 500;
    color: #c59752;
    text-align: left;
}

.glimpse-types, .glimpse-packages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.glimpse-type-card {
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 0px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    position: relative;
}

.glimpse-type-card:hover {
    background: #f9f9f9;
    border-color: #c59752;
}

.glimpse-type-card.selected {
    background: white;
    color: #333;
    border-color: #c59752;
    box-shadow: 0 0 0 2px rgba(197, 151, 82, 0.2);
}

.glimpse-type-card.selected::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #c59752;
}

.glimpse-type-card strong {
    font-weight: 500;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.glimpse-type-card small {
    font-size: 14px;
    opacity: 0.8;
    display: block;
    line-height: 1.4;
}

/* Package cards */
.glimpse-package-card {
    display: block;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    text-align: left;
    list-style: none;
    position: relative;
    margin-bottom: 10px;
}

.glimpse-package-card:hover {
    background: #f9f9f9;
    border-color: #c59752;
}

/* Hide the radio button completely */
.glimpse-package-card input[type="radio"] {
    display: none;
}

/* Selected state styling */
.glimpse-package-card input[type="radio"]:checked + .glimpse-pkg-content {
    color: inherit;
}

.glimpse-package-card:has(input[type="radio"]:checked) {
    background: white;
    color: #333;
    border-color: #c59752;
    box-shadow: 0 0 0 2px rgba(197, 151, 82, 0.2);
}

.glimpse-package-card:has(input[type="radio"]:checked)::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #c59752;
}

/* Fallback for browsers that don't support :has() */
.glimpse-package-card.selected {
    background: white;
    color: #333;
    border-color: #c59752;
    box-shadow: 0 0 0 2px rgba(197, 151, 82, 0.2);
}

.glimpse-package-card.selected::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #c59752;
}

.glimpse-pkg-content {
    width: 100%;
}

.glimpse-pkg-title {
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.glimpse-pkg-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 8px 0;
    padding-right: 30px; /* Space for checkmark */
}

.glimpse-pkg-price {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 8px;
    font-weight: 500;
}

/* Actions */
.glimpse-step-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-start;
}

.glimpse-btn {
    border: 1px solid #c59752;
    color: #c59752;
    text-transform: uppercase;
    font-weight: 500;
    padding: 11px 25px;
    font-size: 16px;
    line-height: 24px;
    border-radius: 0px;
    cursor: pointer;
    font-family: var(--bzo-body_typo-font-family);
    transition: .3s;
    background: white;
}

.glimpse-btn:hover {
    background: #c59752;
    color: white;
}

.glimpse-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.glimpse-btn-primary {
    border: 1px solid #c59752;
    color: white;
    text-transform: uppercase;
    font-weight: 500;
    padding: 11px 25px;
    font-size: 16px;
    line-height: 24px;
    border-radius: 0px;
    cursor: pointer;
    font-family: var(--bzo-body_typo-font-family);
    transition: .3s;
    background: #c59752;
}

.glimpse-btn-primary:hover {
    background: #0c254e;
    border-color: #0c254e;
}

.glimpse-back {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.glimpse-back:hover {
    background: #f5f5f5;
    color: #333;
}

/* Prescription section */
.prescription-file-upload {
    padding: 15px;
    border: 2px dashed #c59752;
    border-radius: 0px;
    text-align: left;
    background: #f9f9f9;
    margin-bottom: 15px;
}

.prescription-file-upload label {
    font-weight: 500;
    color: #c59752;
    margin-bottom: 10px;
    display: block;
    text-align: left;
}

.prescription-file-upload input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
}

#file-upload-status {
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
}

#prescription-details {
    width: 100%;
    padding: 10px;
    border: 1px solid #c59752;
    border-radius: 0px;
    font-family: var(--bzo-body_typo-font-family);
    resize: vertical;
    background: white;
    color: #333;
}

/* Small states */
.glimpse-pres-upload-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    text-align: left;
}

.glimpse-success {
    color: #c59752;
    font-weight: 500;
}

.glimpse-error {
    color: #d9534f;
    font-weight: 500;
}

/* OR divider */
.glimpse-or-divider {
    text-align: center;
    margin: 15px 0;
    color: #666;
    position: relative;
}

.glimpse-or-divider span {
    background: white;
    padding: 0 10px;
    font-size: 14px;
}

.glimpse-or-divider hr {
    margin-top: -10px;
    border: none;
    border-top: 1px solid #ddd;
}

/* Prescription Form Styles */
.prescription-form-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.power-type-selection h4 {
    margin: 0 0 15px 0;
    color: #c59752;
    font-size: 16px;
}

.power-type-selection label {
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.power-type-selection label:hover {
    background: #f0f0f0;
    border-color: #c59752;
}

.power-type-selection input[type="radio"]:checked + span {
    background: #c59752;
    color: white;
}

.prescription-table table {
    box-shadow: 0 2px 4px rgba(12, 37, 78, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.prescription-table th {
    background: #c59752 !important;
    color: #0c254e !important;
    font-weight: 600;
    text-align: center;
}

.prescription-table td {
    text-align: center;
    vertical-align: middle;
}

.prescription-table select,
.prescription-table input[type="number"] {
    border: 1px solid #ddd;
    border-radius: 0px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: var(--bzo-body_typo-font-family);
    background: white;
    color: #333;
}

.prescription-table select:focus,
.prescription-table input[type="number"]:focus {
    border-color: #c59752;
    outline: none;
    box-shadow: 0 0 0 2px rgba(197, 151, 82, 0.1);
}

.prescription-table input[type="number"] {
    text-align: center;
}

/* Responsive design for prescription table */
@media (max-width: 768px) {
    /* Keep table structure but make it more mobile-friendly */
    .prescription-table table {
        width: 100%;
        font-size: 14px;
    }
    
    /* Make header sticky and smaller */
    .prescription-table thead tr {
        background: var(--bzo-title_typo-color) !important;
    }
    
    .prescription-table th {
        padding: 8px 5px !important;
        font-size: 12px !important;
        border: 1px solid #ddd !important;
    }
    
    /* First column (Power type labels) */
    .prescription-table td:first-child {
        font-weight: bold;
        padding: 8px 5px !important;
        font-size: 13px;
        background: #f9f9f9;
        border: 1px solid #ddd !important;
        white-space: nowrap;
        min-width: 60px;
    }
    
    /* Input columns (Right Eye, Left Eye, Both Eyes) */
    .prescription-table td[data-label] {
        padding: 5px !important;
        border: 1px solid #ddd !important;
    }
    
    .prescription-table td[data-label] select,
    .prescription-table td[data-label] input {
        width: 100%;
        padding: 6px 4px;
        font-size: 13px;
    }
    
    /* Smaller table on very small screens */
    @media (max-width: 480px) {
        .prescription-table table {
            font-size: 12px;
        }
        
        .prescription-table th {
            font-size: 11px !important;
            padding: 6px 3px !important;
        }
        
        .prescription-table td:first-child {
            font-size: 11px;
            padding: 6px 3px !important;
            min-width: 50px;
        }
        
        .prescription-table td[data-label] {
            padding: 3px !important;
        }
        
        .prescription-table td[data-label] select,
        .prescription-table td[data-label] input {
            padding: 5px 3px;
            font-size: 12px;
        }
    }
}

/* Manual prescription textarea */
#manual-prescription textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    background: white;
    color: #333;
}

/* Form validation styles */
.prescription-form-container .required {
    border-color: #e74c3c !important;
}

.prescription-form-container .valid {
    border-color: #c59752 !important;
}

/* Power type selection enhancement */
.power-type-selection label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px !important;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.power-type-selection input[type="radio"] {
    margin: 0;
}

.power-type-selection label:has(input[type="radio"]:checked) {
    background: #c59752;
    border-color: #c59752;
    color: white;
    font-weight: 500;
}

/* Power Selection Styles */
.power-selection h4 {
    margin: 0 0 15px 0;
    color: #c59752;
    font-size: 16px;
    font-weight: 500;
}

.power-selection select {
    border: 1px solid #ddd;
    border-radius: 0px;
    background: white;
    color: #333;
    font-family: var(--bzo-body_typo-font-family);
    transition: all 0.3s ease;
}

.power-selection select:focus {
    border-color: #c59752;
    outline: none;
    box-shadow: 0 0 0 2px rgba(197, 151, 82, 0.1);
}

.power-selection label {
    color: #333;
    font-family: var(--bzo-body_typo-font-family);
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

/* Simple Default Checkbox with Brand Color */
.power-selection input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #c59752;
}

/* Remove old radio button styles */
.power-type-selection {
    display: none;
}

/* Responsive */
@media (max-width: 720px) {
    .glimpse-lw-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .glimpse-types, .glimpse-packages {
        gap: 8px;
    }
    
    .glimpse-step-actions {
        flex-direction: column;
    }
    
    .glimpse-btn {
        width: 100%;
        text-align: center;
    }
}

/* Cart and Order Display Styles */
.lens-info {
    margin: 5px 0;
    padding: 8px 12px;
    background: #f9f9f9;
    border-left: 3px solid #c59752;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.lens-info strong {
    color: #c59752;
    font-weight: 600;
}

/* Cart lens info display */
.glimpse-cart-lens-info {
    background: #f9f9f9;
    padding: 8px 12px;
    margin: 8px 0;
    border-left: 3px solid #c59752;
    border-radius: 4px;
    font-size: 13px !important;
    line-height: 1.4;
    color: #333;
}

.glimpse-cart-lens-info div {
    margin: 3px 0;
}

.glimpse-cart-lens-info strong {
    color: #c59752;
    font-weight: 600;
}

/* WooCommerce item data styling */
.wc-item-meta {
    background: #f8f8f8;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 3px solid #c59752;
}

.wc-item-meta-label {
    font-weight: 600 !important;
    color: #c59752 !important;
}

.wc-item-meta-value {
    margin-left: 8px;
    color: #333;
}

/* Enhanced cart item name styling */
.cart_item .product-name small {
    display: block;
    margin-top: 5px;
    font-style: italic;
}

/* Prescription display formatting */
.wc-item-meta .wc-item-meta-value[data-key="Prescription"] {
    white-space: pre-line;
    font-family: monospace;
    background: #f8f8f8;
    padding: 8px;
    border-radius: 4px;
    margin-top: 4px;
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

/* Order details prescription formatting */
.order-item .lens-info {
    margin: 8px 0;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

/* Admin order details */
.woocommerce_order_items_wrapper .lens-info {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    margin: 4px 0;
    border-radius: 3px;
}
