/**
 * GLS Lens Selector - Lens Process Page Styles
 * Mobile-first design for the lens selection wizard
 */

/* ===================================
   Container & Layout
   =================================== */

.gls-lens-process-page {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 20px 0;
}

.gls-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===================================
   Error State
   =================================== */

.gls-error-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
}

.gls-error-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gls-error-icon {
    color: #e74c3c;
    margin-bottom: 20px;
}

.gls-error-box h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.gls-error-box p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ===================================
   Wizard Wrapper
   =================================== */

.gls-wizard-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ===================================
   Wizard Header - Selected Frame
   =================================== */

.gls-wizard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    color: #ffffff;
}

.gls-selected-frame {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gls-frame-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gls-frame-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.gls-frame-info h2 {
    font-size: 22px;
    margin: 0 0 8px 0;
    color: #ffffff;
    font-weight: 600;
}

.gls-frame-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
}

.gls-change-frame {
    display: inline-block;
    color: #ffffff;
    text-decoration: underline;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.gls-change-frame:hover {
    opacity: 1;
    color: #ffffff;
}

/* ===================================
   Progress Steps
   =================================== */

.gls-progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.gls-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    flex: 1;
    min-width: 80px;
}

.gls-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: #dee2e6;
    z-index: 0;
}

.gls-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.gls-step-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
}

.gls-step.gls-step-active .gls-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.gls-step.gls-step-active .gls-step-label {
    color: #2c3e50;
    font-weight: 600;
}

.gls-step.gls-step-completed .gls-step-number {
    background: #28a745;
    color: #ffffff;
}

.gls-step.gls-step-completed::after {
    background: #28a745;
}

/* ===================================
   Wizard Content
   =================================== */

.gls-wizard-content {
    padding: 40px 30px;
    min-height: 400px;
}

.gls-wizard-step {
    display: none;
}

.gls-wizard-step.gls-step-active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gls-wizard-step h3 {
    font-size: 24px;
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-weight: 600;
}

/* ===================================
   Placeholder Message
   =================================== */

.gls-placeholder-message {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 30px;
    text-align: center;
    color: #6c757d;
}

.gls-placeholder-message svg {
    color: #667eea;
    margin-bottom: 20px;
}

.gls-placeholder-message p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.6;
}

.gls-placeholder-details {
    font-size: 14px;
    color: #95a5a6;
}

/* ===================================
   Wizard Navigation
   =================================== */

.gls-wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

/* ===================================
   Buttons
   =================================== */

.gls-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.gls-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.gls-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

.gls-button-primary:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gls-button-secondary {
    background: #ffffff;
    color: #2c3e50;
    border: 2px solid #dee2e6;
}

.gls-button-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #2c3e50;
}

/* ===================================
   Mobile Responsive
   =================================== */

@media (max-width: 768px) {
    .gls-container {
        padding: 0 10px;
    }
    
    .gls-wizard-header {
        padding: 20px;
    }
    
    .gls-selected-frame {
        flex-direction: column;
        text-align: center;
    }
    
    .gls-frame-image {
        width: 80px;
        height: 80px;
    }
    
    .gls-frame-info h2 {
        font-size: 18px;
    }
    
    .gls-frame-price {
        font-size: 18px;
    }
    
    .gls-progress-steps {
        padding: 20px 15px;
        gap: 5px;
    }
    
    .gls-step {
        min-width: 70px;
    }
    
    .gls-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .gls-step-label {
        font-size: 11px;
    }
    
    .gls-step:not(:last-child)::after {
        top: 17px;
    }
    
    .gls-wizard-content {
        padding: 25px 15px;
    }
    
    .gls-wizard-step h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .gls-placeholder-message {
        padding: 40px 20px;
    }
    
    .gls-wizard-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .gls-button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .gls-error-box {
        padding: 30px 20px;
    }
    
    .gls-error-box h2 {
        font-size: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gls-container {
        max-width: 900px;
    }
    
    .gls-progress-steps {
        padding: 25px;
    }
    
    .gls-wizard-content {
        padding: 35px 25px;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .gls-wizard-navigation,
    .gls-progress-steps,
    .gls-whatsapp-help {
        display: none;
    }
}

/* ===================================
   WhatsApp Help Button
   =================================== */

.gls-whatsapp-help {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.gls-whatsapp-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.gls-whatsapp-button:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

.gls-whatsapp-button svg {
    flex-shrink: 0;
}

.gls-whatsapp-help.gls-whatsapp-pulse .gls-whatsapp-button {
    animation: gls-pulse 2s infinite;
}

@keyframes gls-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8), 0 0 0 10px rgba(37, 211, 102, 0.2);
    }
}

/* ===================================
   Step Description
   =================================== */

.gls-step-description {
    color: #6c757d;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ===================================
   Option Cards (Grid Layout)
   =================================== */

.gls-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gls-option-card {
    position: relative;
    cursor: pointer;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #ffffff;
}

.gls-option-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.gls-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gls-option-card input[type="radio"]:checked + .gls-option-content {
    color: #667eea;
}

.gls-option-card input[type="radio"]:checked ~ .gls-option-content .gls-option-check {
    opacity: 1;
    transform: scale(1);
}

.gls-option-card input[type="radio"]:checked + .gls-option-content .gls-option-icon {
    color: #667eea;
}

.gls-option-content {
    position: relative;
}

.gls-option-icon {
    color: #95a5a6;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.gls-option-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
}

.gls-option-check {
    position: absolute;
    top: -15px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #667eea;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

/* ===================================
   Option Rows (List Layout)
   =================================== */

.gls-options-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.gls-option-row {
    position: relative;
    cursor: pointer;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    background: #ffffff;
}

.gls-option-row:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.gls-option-row input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gls-option-row input[type="radio"]:checked ~ .gls-option-row-content {
    color: #667eea;
}

.gls-option-row input[type="radio"]:checked ~ .gls-option-row-check {
    opacity: 1;
    transform: scale(1);
}

.gls-option-row-content {
    flex: 1;
}

.gls-option-row-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.gls-option-row-price {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
}

.gls-option-row-check {
    width: 28px;
    height: 28px;
    background: #667eea;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    margin-left: 15px;
}

/* ===================================
   Prescription Form
   =================================== */

.gls-prescription-form {
    margin-bottom: 30px;
}

.gls-prescription-table-wrapper {
    overflow-x: auto;
    margin-bottom: 25px;
}

.gls-prescription-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.gls-prescription-table th,
.gls-prescription-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.gls-prescription-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.gls-prescription-table td {
    vertical-align: middle;
}

.gls-prescription-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.gls-prescription-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gls-prescription-pd {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.gls-prescription-pd label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.gls-optional {
    font-weight: normal;
    color: #6c757d;
    font-size: 14px;
}

.gls-prescription-input {
    width: 100%;
    max-width: 200px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 8px;
}

.gls-prescription-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gls-prescription-pd small {
    display: block;
    color: #6c757d;
    font-size: 13px;
    line-height: 1.5;
}

/* ===================================
   Info Boxes
   =================================== */

.gls-info-box,
.gls-warning-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.gls-info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
}

.gls-warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.gls-info-box svg,
.gls-warning-box svg {
    flex-shrink: 0;
}

.gls-info-box p,
.gls-warning-box p {
    margin: 0;
    line-height: 1.6;
}

.gls-warning-box p:first-of-type {
    margin-bottom: 8px;
}

/* ===================================
   Review Section
   =================================== */

.gls-review-summary {
    margin-bottom: 30px;
}

.gls-review-section {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.gls-review-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.gls-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.gls-review-item:last-child {
    border-bottom: none;
}

.gls-review-label {
    color: #6c757d;
    font-size: 15px;
}

.gls-review-value {
    color: #2c3e50;
    font-weight: 500;
    font-size: 15px;
}

.gls-review-prescription-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.gls-review-prescription-table th,
.gls-review-prescription-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.gls-review-prescription-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
}

.gls-review-pd {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

.gls-price-breakdown {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

.gls-total-row {
    background: #e9ecef;
    padding: 15px 0 !important;
    font-size: 18px;
}

.gls-discount-row {
    color: #28a745;
}

.gls-discount-row .gls-review-value {
    color: #28a745;
    font-weight: 600;
}

/* Mobile WhatsApp Button */
@media (max-width: 768px) {
    .gls-whatsapp-help {
        bottom: 20px;
        right: 20px;
    }
    
    .gls-whatsapp-button span {
        display: none;
    }
    
    .gls-whatsapp-button {
        width: 56px;
        height: 56px;
        justify-content: center;
        border-radius: 50%;
        padding: 0;
        gap: 0;
    }
}

/* ========================================
   PRESCRIPTION UPLOAD & WHATSAPP HELP
   ======================================== */

/* Prescription Method Toggle */
.gls-prescription-method-toggle {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.gls-toggle-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.gls-method-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #ffffff;
    border: 2px solid #dddddd;
    border-radius: 8px;
    color: #555555;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 250px;
    flex: 1;
}

.gls-method-btn svg {
    flex-shrink: 0;
}

.gls-method-btn:hover {
    background: #f0f7ff;
    border-color: #0073aa;
    color: #0073aa;
}

.gls-method-btn.gls-method-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #ffffff;
}

.gls-method-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Upload Section */
.gls-prescription-upload-section {
    margin: 30px 0;
}

.gls-upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.gls-upload-dropzone {
    background: #fafafa;
    border: 3px dashed #dddddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gls-upload-dropzone * {
    cursor: pointer;
    pointer-events: none;
}

.gls-upload-dropzone:hover {
    background: #f0f7ff;
    border-color: #0073aa;
}

.gls-upload-dropzone.gls-dragover {
    background: #e8f4f8;
    border-color: #0073aa;
    border-style: solid;
    transform: scale(1.02);
}

.gls-upload-dropzone svg {
    color: #0073aa;
    margin-bottom: 20px;
}

.gls-upload-text {
    margin: 20px 0 10px;
    font-size: 16px;
    color: #333333;
}

.gls-upload-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.gls-upload-text span {
    color: #666666;
    font-size: 15px;
}

.gls-upload-requirements {
    margin: 10px 0 0;
    font-size: 13px;
    color: #666666;
}

/* Upload Preview */
.gls-upload-preview {
    background: #f8f9fa;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.gls-preview-content {
    margin-bottom: 20px;
}

#gls-preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#gls-preview-pdf {
    padding: 20px;
}

#gls-preview-pdf svg {
    color: #dc3545;
    margin-bottom: 15px;
}

#gls-preview-filename {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 10px 0 5px;
    word-break: break-all;
}

#gls-preview-filesize {
    font-size: 14px;
    color: #666;
}

.gls-remove-upload {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.gls-remove-upload:hover {
    background: #c82333;
}

/* Upload Progress */
.gls-upload-progress {
    text-align: center;
    padding: 40px;
}

.gls-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.gls-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.gls-upload-progress p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Upload Error */
.gls-upload-error {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.gls-error-message {
    color: #856404;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 15px;
}

.gls-retry-upload {
    background: #ffc107;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s ease;
}

.gls-retry-upload:hover {
    background: #e0a800;
}

/* WhatsApp Help Section */
.gls-whatsapp-help-section {
    margin: 40px 0 30px;
    padding: 25px;
    background: #e8f5e9;
    border-radius: 12px;
    border: 2px solid #25d366;
    text-align: center;
}

.gls-help-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #2e7d32;
}

.gls-help-box svg {
    flex-shrink: 0;
}

.gls-help-box p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.gls-button-whatsapp {
    background: #25d366;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.gls-button-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.gls-button-whatsapp svg {
    flex-shrink: 0;
}

.gls-button-whatsapp:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gls-toggle-buttons {
        flex-direction: column;
    }
    
    .gls-method-btn {
        max-width: 100%;
    }
    
    .gls-upload-dropzone {
        padding: 40px 20px;
    }
    
    .gls-button-whatsapp {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .gls-whatsapp-help-section {
        padding: 20px 15px;
    }
    
    #gls-preview-image {
        max-height: 200px;
    }
}
