/* ============================================================
   CHECKBOOST ÓTICA - CSS FRONTEND MODAL
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- BOTÃO ESCOLHER LENTES ---- */
.cbo-btn-escolher-lentes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.cbo-btn-escolher-lentes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 52, 96, 0.4);
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
}

/* ---- OVERLAY ---- */
.cbo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    padding: 20px;
    box-sizing: border-box;
}

.cbo-modal-overlay.cbo-active {
    opacity: 1;
    visibility: visible;
}

/* ---- MODAL ---- */
.cbo-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.98);
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

.cbo-modal-overlay.cbo-active .cbo-modal {
    transform: translateY(0) scale(1);
}

/* ---- HEADER ---- */
.cbo-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.cbo-modal-progress-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cbo-modal-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.cbo-modal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a1a2e, #4f46e5);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.cbo-modal-step-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.cbo-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cbo-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* ---- BODY ---- */
.cbo-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 28px 20px;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.cbo-modal-body::-webkit-scrollbar {
    width: 4px;
}

.cbo-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.cbo-modal-body::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 2px;
}

/* ---- STEPS ---- */
.cbo-step {
    display: none;
    animation: cboFadeIn 0.3s ease;
}

.cbo-step.active {
    display: block;
}

@keyframes cboFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cbo-step-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.cbo-step-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ---- LOADING ---- */
.cbo-step-loading {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.cbo-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: cboSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes cboSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- OPÇÕES (CARDS) ---- */
.cbo-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cbo-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.cbo-option-card:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
}

.cbo-option-card.cbo-selected {
    border-color: #4f46e5;
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cbo-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    overflow: hidden;
}

.cbo-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cbo-option-content {
    flex: 1;
}

.cbo-option-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cbo-option-badge {
    font-size: 9px;
    font-weight: 700;
    background: #1a1a2e;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.08em;
}

.cbo-option-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    white-space: pre-line;
}

.cbo-option-price {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
    flex-shrink: 0;
}

.cbo-option-price.cbo-price-included {
    color: #22c55e;
}

.cbo-option-check {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cbo-selected .cbo-option-check {
    background: #4f46e5;
    border-color: #4f46e5;
}

.cbo-selected .cbo-option-check::after {
    content: '';
    width: 8px;
    height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
    display: block;
}

/* ---- UPLOAD ZONE ---- */
.cbo-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    margin-bottom: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.cbo-upload-zone:hover,
.cbo-upload-zone.cbo-drag-over {
    border-color: #4f46e5;
    background: #f5f3ff;
}

.cbo-upload-icon {
    color: #9ca3af;
    margin-bottom: 12px;
}

.cbo-upload-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.cbo-upload-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 16px;
    line-height: 1.6;
}

.cbo-upload-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 1.5px solid #1a1a2e;
    border-radius: 6px;
    background: transparent;
    color: #1a1a2e;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.cbo-upload-btn:hover {
    background: #1a1a2e;
    color: white;
}

.cbo-upload-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 16px;
}

.cbo-upload-preview-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}

.cbo-upload-remove {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.cbo-upload-remove:hover {
    background: #fee2e2;
}

.cbo-upload-later {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.cbo-upload-later svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.cbo-upload-later p {
    margin: 0;
}

.cbo-upload-later strong {
    display: block;
    color: #374151;
    margin-bottom: 4px;
}

/* ---- DNP INSTRUCTIONS ---- */
.cbo-dnp-instructions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.cbo-dnp-card {
    padding: 16px;
    border-radius: 10px;
    border: 1.5px solid;
}

.cbo-dnp-correct {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.cbo-dnp-wrong {
    border-color: #fecaca;
    background: #fef2f2;
}

.cbo-dnp-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
}

.cbo-dnp-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cbo-dnp-icon-ok {
    background: #22c55e;
}

.cbo-dnp-icon-err {
    background: #ef4444;
}

.cbo-dnp-card ul {
    margin: 0;
    padding-left: 18px;
}

.cbo-dnp-card li {
    font-size: 12px;
    color: #374151;
    margin-bottom: 4px;
    line-height: 1.5;
}

/* ---- RESUMO ---- */
.cbo-resumo-section {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.cbo-resumo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.cbo-resumo-armacao {
    background: #f9fafb;
}

.cbo-resumo-label {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.cbo-resumo-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.cbo-resumo-lentes-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cbo-resumo-editar {
    background: none;
    border: none;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.cbo-resumo-detalhes {
    padding: 12px 20px;
}

.cbo-resumo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 13px;
}

.cbo-resumo-item:last-child {
    border-bottom: none;
}

.cbo-resumo-item span {
    color: #6b7280;
}

.cbo-resumo-item strong {
    color: #1a1a2e;
    font-weight: 600;
}

.cbo-resumo-aviso {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 16px;
}

.cbo-resumo-aviso p {
    margin: 0;
}

.cbo-resumo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 2px solid #1a1a2e;
    margin-bottom: 20px;
}

.cbo-resumo-total span {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.cbo-resumo-total strong {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
}

.cbo-btn-adicionar-carrinho {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.cbo-btn-adicionar-carrinho:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 62, 62, 0.4);
}

.cbo-btn-adicionar-carrinho:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ---- FOOTER ---- */
.cbo-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
    gap: 12px;
}

.cbo-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cbo-btn-voltar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.cbo-btn-voltar:hover {
    background: #f3f4f6;
    color: #1a1a2e;
}

.cbo-btn-continuar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.cbo-btn-continuar:hover {
    background: #0f3460;
    transform: translateX(2px);
}

.cbo-btn-continuar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---- SUAS ESCOLHAS DROPDOWN ---- */
.cbo-suas-escolhas {
    position: relative;
}

.cbo-suas-escolhas-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.cbo-suas-escolhas-btn:hover {
    background: #f3f4f6;
}

.cbo-suas-escolhas-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 10;
}

.cbo-suas-escolhas-dropdown.cbo-open {
    display: block;
    animation: cboFadeIn 0.2s ease;
}

.cbo-escolha-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
}

.cbo-escolha-item:last-child {
    border-bottom: none;
}

.cbo-escolha-item span:first-child {
    color: #9ca3af;
}

.cbo-escolha-item span:last-child {
    font-weight: 600;
    color: #1a1a2e;
}

/* ---- RESPONSIVO ---- */
@media (max-width: 640px) {
    .cbo-modal {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
    }

    .cbo-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .cbo-modal-body {
        padding: 20px;
    }

    .cbo-modal-footer {
        padding: 12px 20px;
    }

    .cbo-suas-escolhas {
        display: none;
    }
}