/* ========================================
   VISOTICS MULTISTEP - REDESIGN MINIMALISTA
   Paleta baseada no site (cores escuras + dourado)
   ======================================== */

:root {
    /* Cores do Site */
    --vis-primary: #DEC344;
    /* Dourado/Secondary */
    --vis-primary-hover: #c4a93a;
    --vis-accent: #CF5409;
    /* Laranja */
    --vis-danger: #FF3762;
    /* Tertiery/Vermelho */

    /* Escala de Cinzas */
    --vis-dark-100: #000000;
    --vis-dark-60: #00000099;
    --vis-dark-30: #0000004D;
    --vis-light-100: #FFFFFF;
    --vis-light-60: #FFFFFF99;
    --vis-light-30: #FFFFFF4D;
    --vis-gray: #F5F5F5;
    --vis-overlay: #33333399;

    /* Text */
    --vis-text: #000000;
    --vis-text-muted: #00000099;

    /* Layout */
    --vis-radius: 8px;
    --vis-radius-sm: 4px;
    --vis-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ========================================
   MODAL / OVERLAY
   ======================================== */
#visotics-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--vis-overlay);
    z-index: 2147483646;
    backdrop-filter: blur(4px);
    display: none;
}

#visotics-overlay.active {
    display: block !important;
}

#visotics-overlay.hidden {
    display: none !important;
}

.visotics-app-container {
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-width: 1100px;
    height: 90vh;
    max-height: 700px;
    background: var(--vis-light-100);
    border-radius: var(--vis-radius);
    box-shadow: var(--vis-shadow);
    z-index: 2147483647;
    overflow: hidden;
    display: none;
}

.visotics-app-container * {
    box-sizing: border-box;
}

.visotics-app-container.active {
    display: block !important;
    animation: modalIn 0.25s ease-out;
}

.visotics-app-container.hidden {
    display: none !important;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ========================================
   SPLIT LAYOUT
   ======================================== */
.visotics-split-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

/* LEFT PANEL - Produto (Fundo Branco) */
.visotics-left-panel {
    flex: 0 0 35%;
    background: var(--vis-light-100);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid var(--vis-gray);
}

.product-info-sticky {
    text-align: center;
    width: 100%;
}

.product-image-large {
    margin-bottom: 20px;
}

.product-image-large img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.visotics-left-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--vis-text);
    margin: 0 0 8px 0;
}

.visotics-left-panel .base-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--vis-accent);
}

/* Mini Summary */
.visotics-mini-summary {
    margin-top: 25px;
    text-align: left;
    background: var(--vis-gray);
    padding: 15px;
    border-radius: var(--vis-radius-sm);
    width: 100%;
}

.visotics-mini-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-step {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.8rem;
    color: var(--vis-text-muted);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-step:last-child {
    border-bottom: none;
}

.summary-step span {
    font-weight: 600;
    color: var(--vis-text);
}

/* ========================================
   RIGHT PANEL - Steps
   ======================================== */
.visotics-right-panel {
    flex: 1;
    background: var(--vis-gray);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================================
   HEADER - Barra de Progresso + Botões
   ======================================== */
.visotics-steps-header {
    background: var(--vis-light-100);
    padding: 15px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Botão Voltar (Seta) */
.btn-visotics-back {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--vis-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.2rem;
    color: var(--vis-text-muted);
}

.btn-visotics-back:hover {
    background: var(--vis-dark-30);
    color: var(--vis-text);
    transform: scale(1.05);
}

.btn-visotics-back:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Barra de Progresso Visual */
.visotics-progress-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 6px;
    background: var(--vis-gray);
    border-radius: 3px;
    overflow: hidden;
}

.progress-segment {
    flex: 1;
    height: 100%;
    background: var(--vis-dark-30);
    transition: background 0.3s;
}

.progress-segment.completed {
    background: var(--vis-primary);
}

.progress-segment.active {
    background: var(--vis-primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Botão Fechar (X) */
.btn-visotics-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.4rem;
    color: var(--vis-text-muted);
}

.btn-visotics-close:hover {
    background: var(--vis-danger);
    color: var(--vis-light-100);
    transform: scale(1.05);
}

/* ========================================
   STEP CONTENT AREA
   ======================================== */
.visotics-step-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.visotics-step {
    display: none;
    animation: fadeSlide 0.3s ease-out;
}

.visotics-step.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step Titles - Gatilhos Mentais */
.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--vis-text);
    margin: 0 0 8px 0;
}

.step-description {
    font-size: 0.9rem;
    color: var(--vis-text-muted);
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.step-header-nav {
    display: none;
    /* Botão voltar agora está no header */
}

/* ========================================
   CARDS - Layout Vertical com Imagem à Esquerda
   ======================================== */
.visotics-grid,
.visotics-choice-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.visotics-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 2px solid transparent;
    border-radius: var(--vis-radius);
    background: var(--vis-light-100);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.visotics-card:hover {
    border-color: var(--vis-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.visotics-card.selected {
    border-color: var(--vis-primary);
    background: linear-gradient(to right, rgba(222, 195, 68, 0.1), var(--vis-light-100));
}

/* Card Image - Grande, sem espaçamento */
.visotics-card-image {
    flex: 0 0 140px;
    min-height: 100px;
    background: var(--vis-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.visotics-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Content */
.visotics-card-content {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.visotics-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vis-text);
    margin: 0 0 5px 0;
}

.visotics-card p {
    font-size: 0.85rem;
    color: var(--vis-text-muted);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

/* Card Price */
.visotics-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-main {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vis-accent);
}

.price-installment {
    font-size: 0.75rem;
    color: var(--vis-text-muted);
}

/* ========================================
   STEP 1 - Choice Cards (Receita)
   ======================================== */
.choice-card {
    flex-direction: column;
    text-align: center;
    padding: 30px 25px;
}

.choice-card .card-icon {
    font-size: 2.5rem;
    color: var(--vis-primary);
    margin-bottom: 15px;
}

.choice-card .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--vis-primary);
}

/* ========================================
   STEP 4 - Treatments (Multi-select)
   ======================================== */
.visotics-card.treatment-card.selected {
    background: linear-gradient(to right, rgba(207, 84, 9, 0.08), var(--vis-light-100));
    border-color: var(--vis-accent);
}

.visotics-card.treatment-card .visotics-card-content::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid var(--vis-dark-30);
    border-radius: 4px;
    transition: all 0.2s;
}

.visotics-card.treatment-card.selected .visotics-card-content::after {
    background: var(--vis-accent);
    border-color: var(--vis-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

/* ========================================
   ACTIONS FOOTER
   ======================================== */
.visotics-actions {
    background: var(--vis-light-100);
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-price-display {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 0.8rem;
    color: var(--vis-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vis-text);
}

.total-installment {
    font-size: 0.8rem;
    color: var(--vis-text-muted);
}

.btn-visotics-finish {
    background: var(--vis-primary);
    color: var(--vis-dark-100);
    border: none;
    padding: 14px 35px;
    border-radius: var(--vis-radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-visotics-finish:hover {
    background: var(--vis-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 195, 68, 0.4);
}

.btn-visotics-finish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-visotics-next {
    background: var(--vis-primary);
    color: var(--vis-dark-100);
    border: none;
    padding: 12px 25px;
    border-radius: var(--vis-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-visotics-next:hover {
    background: var(--vis-primary-hover);
}

/* Hidden prev buttons (now in header) */
.btn-visotics-prev {
    display: none;
}

/* ========================================
   FILE UPLOAD AREA
   ======================================== */
#file-preview-area {
    background: var(--vis-light-100);
    padding: 20px;
    border-radius: var(--vis-radius);
    text-align: center;
}

#file-preview-area p {
    margin: 0 0 15px 0;
    color: var(--vis-text);
}

#btn-change-file {
    background: transparent;
    border: 1px solid var(--vis-dark-30);
    padding: 8px 16px;
    border-radius: var(--vis-radius-sm);
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

#btn-change-file:hover {
    border-color: var(--vis-text);
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .visotics-app-container {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .visotics-split-layout {
        flex-direction: column;
    }

    .visotics-left-panel {
        display: none;
        /* Hide on mobile */
    }

    .visotics-right-panel {
        flex: 1;
    }

    .visotics-card {
        flex-direction: column;
    }

    .visotics-card-image {
        flex: 0 0 120px;
        width: 100%;
    }

    .visotics-steps-header {
        padding: 12px 15px;
    }

    .visotics-step-content {
        padding: 15px;
    }

    .visotics-actions {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }

    .btn-visotics-finish {
        width: 100%;
    }
}