/**
 * Estilos de la Calculadora de Nicokits y Glicerina para Kodigo Vape
 * Identidad visual: Dorado #caa462, Oscuro #1a1a1a / #111111, Blanco
 */

/* Boton disparador en ficha de producto */
.kv-product-calc-wrapper {
    margin: 18px 0;
    clear: both;
}

.kv-product-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #222222 0%, #111111 100%);
    color: #caa462 !important;
    border: 1.5px solid #caa462;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer !important;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    justify-content: center;
    text-align: center;
    outline: none;
    position: relative;
    z-index: 10;
}

.kv-product-open-btn * {
    pointer-events: none;
}

.kv-product-open-btn:hover {
    background: #caa462;
    color: #111111 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(202, 164, 98, 0.35);
}

.kv-product-open-btn .kv-btn-icon {
    font-size: 18px;
}

.kv-btn-badge {
    background: rgba(202, 164, 98, 0.2);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kv-product-open-btn:hover .kv-btn-badge {
    background: #111111;
    color: #caa462;
}

/* Modal Overlay */
.kv-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    animation: kvFadeIn 0.2s ease-out;
}

.kv-modal-overlay.active,
.kv-modal-overlay[style*="display: flex"],
.kv-modal-overlay[style*="display:flex"] {
    display: flex !important;
}

.kv-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 14px;
    position: relative;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    border: 1px solid #e2d3b5;
    animation: kvSlideUp 0.25s ease-out;
    z-index: 100000000 !important;
}

.kv-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 28px;
    line-height: 1;
    color: #999999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.kv-modal-close:hover {
    color: #111111;
}

/* Contenedor General de la Calculadora */
.kv-calculator-container {
    padding: 24px;
    font-family: inherit;
    color: #333333;
}

.kv-calc-header {
    text-align: center;
    margin-bottom: 22px;
    border-bottom: 1px solid #f0ede6;
    padding-bottom: 16px;
}

.kv-calc-logo-badge {
    display: inline-block;
    background: #111111;
    color: #caa462;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.kv-calc-title {
    font-size: 22px;
    font-weight: 700;
    color: #caa462 !important;
    margin: 6px 0;
}

.kv-intro-banner h1 {
    color: #caa462 !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.s-title {
    color: #caa462 !important;
}

.kv-calc-subtitle {
    font-size: 13px;
    color: #777777;
    margin: 0;
}

/* Pasos y Grupos de Formulario */
.kv-form-group {
    margin-bottom: 22px;
}

.kv-step-heading {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.kv-step-heading-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.kv-step-heading-row .kv-step-heading {
    margin-bottom: 0 !important;
}

.kv-step-title,
.kv-step-heading .kv-step-title,
#kv-calculator-app .kv-step-title,
body .kv-calculator-container .kv-step-title {
    display: inline-block !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #caa462 !important;
    line-height: 1.3 !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
}

.kv-step-num {
    background: #caa462 !important;
    color: #111111 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

/* Chips de Tipo (Sales / Base Libre) - Usa la misma base de kv-chip */
.kv-type-chips {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
}

.kv-type-chips .kv-chip {
    text-align: left !important;
    padding: 14px 16px !important;
    min-height: 84px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.kv-type-chips .kv-chip-vol {
    font-size: 16px !important;
    font-weight: 800 !important;
    margin-bottom: 5px !important;
}

.kv-type-chips .kv-chip-sub {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

/* Chips / Botones de Seleccion */
.kv-btn-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.kv-btn-chips.kv-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.kv-chip {
    flex: 1;
    min-width: 90px;
    padding: 12px 10px;
    background: #f7f6f2;
    border: 1.5px solid #e6e2d8;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    outline: none;
}

.kv-chip > *,
.kv-quick-chip > * {
    pointer-events: none;
}

.kv-chip:hover {
    border-color: #caa462;
    background: #fff;
}

.kv-chip.active {
    background: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.kv-chip-vol {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.kv-chip.active .kv-chip-vol {
    color: #caa462 !important;
}

.kv-chip-sub {
    display: block;
    font-size: 11px;
    color: #888888;
    margin-top: 2px;
}

.kv-chip.active .kv-chip-sub {
    color: #cccccc !important;
}

/* Botones rapidos para base libre */
.kv-quick-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.kv-quick-chip {
    flex: 1;
    padding: 7px 10px;
    background: #f5f4ef;
    border: 1px solid #dcd7cb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.kv-quick-chip:hover {
    border-color: #caa462;
    background: #fff;
}

.kv-quick-chip.active {
    background: #caa462;
    border-color: #caa462;
    color: #111111;
    font-weight: 700;
}

/* Sliders */
.kv-slider-wrapper {
    padding: 6px 4px;
}

.kv-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e2ddd2;
    outline: none;
    margin: 10px 0;
}

.kv-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #111111;
    border: 3px solid #caa462;
    cursor: pointer;
    transition: transform 0.15s;
}

.kv-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.kv-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888888;
}

/* Acordeon Aroma */
.kv-accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f3ec;
    border: 1px dashed #caa462;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    transition: background 0.2s;
}

.kv-accordion-trigger:hover {
    background: #eeebe1;
}

.kv-aroma-indicator {
    background: #caa462;
    color: #111111;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.kv-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    margin-left: 6px;
}

.kv-accordion-content {
    background: #faf9f6;
    border: 1px solid #e9e5dd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 14px;
}

.kv-sublabel {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

.kv-help-text {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* SECCION DE RESULTADOS */
.kv-calc-results {
    background: linear-gradient(180deg, #1f1f1f 0%, #141414 100%);
    border-radius: 12px;
    padding: 20px;
    color: #ffffff;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid #333333;
}

.kv-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d2d2d;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.kv-results-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}

.kv-target-badge {
    background: #caa462;
    color: #111111;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.kv-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.kv-result-card {
    background: #252525;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #383838;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s;
}

.kv-result-card:hover {
    border-color: #caa462;
    transform: translateY(-2px);
}

.kv-card-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.kv-card-label {
    display: block;
    font-size: 12px;
    color: #aaaaaa;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.kv-card-value {
    font-size: 16px;
    font-weight: 800;
    color: #caa462;
    line-height: 1.3;
}

.kv-card-sub {
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
    margin-bottom: 14px;
}

.kv-buy-btn {
    display: block;
    background: #caa462;
    color: #111111 !important;
    text-align: center;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s;
}

.kv-buy-btn:hover {
    background: #e2be79;
    color: #000000 !important;
    transform: scale(1.02);
}

/* Barra de Composicion */
.kv-bottle-bar-section {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
}

.kv-bottle-bar-labels {
    font-size: 12px;
    color: #cccccc;
    margin-bottom: 8px;
}

.kv-bottle-bar {
    display: flex;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    background: #000000;
}

.kv-bar-part {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    transition: width 0.3s ease-in-out;
}

.kv-bar-aroma {
    background: #9b51e0;
}

.kv-bar-niko {
    background: #caa462;
    color: #111111;
}

.kv-bar-vg {
    background: #27ae60;
}

.kv-bottle-bar-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #aaaaaa;
    margin-top: 10px;
}

.kv-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 4px;
}

.kv-dot-aroma { background: #9b51e0; }
.kv-dot-niko { background: #caa462; }
.kv-dot-vg { background: #27ae60; }

/* Barra de Densidad Resultante PG / VG */
.kv-density-section {
    margin-top: 10px;
    border-top: 1px dashed rgba(202, 164, 98, 0.25);
    padding-top: 12px;
}

.kv-bar-ratio-vg {
    background: linear-gradient(135deg, #caa462 0%, #a88344 100%);
    color: #111111;
}

.kv-bar-ratio-pg {
    background: linear-gradient(135deg, #2f80ed 0%, #1c5bb0 100%);
    color: #ffffff;
}

.kv-dot-ratio-vg { background: #caa462; }
.kv-dot-ratio-pg { background: #2f80ed; }

/* Tips */
.kv-tips-box {
    display: flex;
    gap: 10px;
    background: rgba(202, 164, 98, 0.1);
    border-left: 3px solid #caa462;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: #d6cfbf;
    line-height: 1.4;
}

.kv-tip-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Ocultar el consejo de la bombilla exclusivamente en la versión modal emergente */
.kv-modal-dialog .kv-tips-box {
    display: none !important;
}

/* Ajuste de márgenes en la ventana emergente para que entre completa sin scroll vertical */
.kv-modal-dialog .kv-calculator-container {
    padding: 16px 20px 14px 20px;
}

.kv-modal-dialog .kv-calc-header {
    margin-bottom: 12px;
}

.kv-modal-dialog .kv-calc-title {
    font-size: 19px;
    margin: 4px 0 2px 0;
}

.kv-modal-dialog .kv-calc-subtitle {
    font-size: 12px;
}

.kv-modal-dialog .kv-form-group {
    margin-bottom: 10px;
}

.kv-modal-dialog .kv-bottle-bar-section {
    margin-top: 10px;
    padding: 10px 14px;
}

/* Pagina Front Dedicada */
.kv-page-calc-container {
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 10px;
}

.kv-intro-banner {
    text-align: center;
    margin-bottom: 28px;
}

.kv-intro-banner h1 {
    font-size: 28px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 10px;
}

.kv-intro-banner p {
    font-size: 15px;
    color: #666666;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.kv-faq-section {
    margin-top: 40px;
    border-top: 1px solid #eeeeee;
    padding-top: 30px;
}

.kv-faq-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 20px;
}

.kv-faq-item {
    margin-bottom: 18px;
    background: #fbfbfb;
    border-left: 3px solid #caa462;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
}

.kv-faq-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 6px 0;
}

.kv-faq-item p {
    font-size: 13px;
    color: #555555;
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 767px) {
    .kv-calculator-container {
        padding: 16px 12px;
    }
    .kv-type-chips,
    .kv-results-grid {
        grid-template-columns: 1fr;
    }
    .kv-btn-chips.kv-grid-3 {
        grid-template-columns: 1fr;
    }
    .kv-calc-title {
        font-size: 19px;
    }
}

@keyframes kvFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enlace en la barra superior (Top Bar Nav) */
.kv-nav-calc-item {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    font-size: 13px;
    vertical-align: middle;
}

.kv-nav-calc-item a {
    color: #caa462 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.kv-nav-calc-item a:hover {
    color: #ffffff !important;
    opacity: 0.9;
}

.kv-nav-calc-item .kv-nav-icon {
    font-size: 14px;
}


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