/**
 * NGC Herramientas - Estilos v2.4
 * Fondo negro, acentos rojos (#E10600)
 */

/* Botón flotante */
.ngc-tools-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    border: 2px solid #333;
}

.ngc-tools-btn:hover {
    transform: scale(1.1);
    border-color: #E10600;
    box-shadow: 0 6px 30px rgba(225,6,0,0.3);
}

.ngc-tools-svg {
    width: 24px;
    height: 24px;
    transition: stroke 0.3s;
}

.ngc-tools-btn:hover .ngc-tools-svg {
    stroke: #E10600;
}

/* Overlay */
.ngc-tools-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.ngc-tools-overlay.active {
    display: flex;
}

/* Popup */
.ngc-tools-popup {
    background: #0a0a0a;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #222;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: max-width 0.3s ease;
}

.ngc-tools-popup.ngc-popup-wide {
    max-width: 680px;
}

/* Header */
.ngc-tools-header {
    background: #111;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
}

.ngc-tools-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ngc-tools-close {
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.ngc-tools-close:hover {
    color: #E10600;
}

/* Contenido */
.ngc-tools-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Menú de herramientas */
.ngc-tools-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ngc-tool-card {
    background: #151515;
    border: 1px solid #252525;
    border-left: 3px solid #333;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ngc-tool-card:hover {
    background: #1a1a1a;
    border-color: #252525;
    border-left-color: #E10600;
    transform: translateX(4px);
}

.ngc-tool-name {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.ngc-tool-desc {
    color: #888;
    font-size: 13px;
}

/* Botón volver */
.ngc-tool-back {
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.ngc-tool-back:hover {
    color: #E10600;
}

/* ==================== */
/* TEST: ¿QUÉ COCHE?    */
/* ==================== */

.ngc-test-container {
    color: #fff;
}

.ngc-test-progress {
    background: #222;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 24px;
    overflow: hidden;
}

.ngc-test-progress-bar {
    background: #E10600;
    height: 100%;
    transition: width 0.4s ease;
}

.ngc-test-question {
    text-align: center;
}

.ngc-test-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #fff;
}

.ngc-test-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ngc-test-options.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ngc-test-option {
    background: #151515;
    border: 2px solid #252525;
    border-radius: 12px;
    padding: 18px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ngc-test-option:hover {
    border-color: #E10600;
    background: #1a1a1a;
}

.ngc-test-option-label {
    font-size: 14px;
    color: #ccc;
    text-align: center;
    font-weight: 500;
}

.ngc-test-option:hover .ngc-test-option-label {
    color: #fff;
}

/* Resultados del test */
.ngc-test-results {
    text-align: center;
}

.ngc-test-results h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.ngc-test-result-card {
    background: #151515;
    border: 1px solid #252525;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    text-align: left;
}

.ngc-test-result-card.top {
    border-color: #E10600;
    background: linear-gradient(135deg, #1a0a0a 0%, #151515 100%);
}

.ngc-test-result-badge {
    background: #E10600;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.ngc-test-result-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.ngc-test-result-price {
    color: #E10600;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ngc-test-result-desc {
    color: #999;
    font-size: 13px;
    line-height: 1.5;
}

.ngc-test-result-match {
    color: #4ade80;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.ngc-test-retry {
    background: #E10600;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.ngc-test-retry:hover {
    background: #c50500;
}

/* ==================== */
/* COMPARADOR COSTES    */
/* ==================== */

.ngc-comp-container {
    color: #fff;
}

.ngc-comp-section {
    margin-bottom: 24px;
}

.ngc-comp-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ccc;
}

.ngc-comp-input {
    width: 100%;
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

.ngc-comp-input:focus {
    outline: none;
    border-color: #E10600;
}

.ngc-comp-cars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ngc-comp-car-row {
    display: flex;
    gap: 10px;
}

.ngc-comp-car-row select {
    flex: 1;
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
}

.ngc-comp-car-row select:focus {
    outline: none;
    border-color: #E10600;
}

.ngc-comp-btn {
    width: 100%;
    background: #E10600;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ngc-comp-btn:hover {
    background: #c50500;
}

.ngc-comp-results {
    margin-top: 24px;
}

.ngc-comp-result-card {
    background: #151515;
    border: 1px solid #252525;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.ngc-comp-result-card.winner {
    border-color: #4ade80;
}

.ngc-comp-result-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.ngc-comp-result-total {
    font-size: 24px;
    font-weight: 700;
    color: #E10600;
    margin-bottom: 16px;
}

.ngc-comp-result-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ngc-comp-result-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}

.ngc-comp-result-item span:last-child {
    color: #ccc;
}

.ngc-comp-winner-badge {
    background: #4ade80;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

/* ==================== */
/* CALCULADORA EV       */
/* ==================== */

.ngc-ev-container {
    color: #fff;
}

.ngc-ev-section {
    margin-bottom: 20px;
}

.ngc-ev-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ccc;
}

.ngc-ev-input {
    width: 100%;
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

.ngc-ev-input:focus {
    outline: none;
    border-color: #E10600;
}

.ngc-ev-radio-group {
    display: flex;
    gap: 10px;
}

.ngc-ev-radio {
    flex: 1;
    background: #151515;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #ccc;
}

.ngc-ev-radio.selected {
    border-color: #E10600;
    background: #1a1a1a;
    color: #fff;
}

.ngc-ev-btn {
    width: 100%;
    background: #E10600;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.ngc-ev-btn:hover {
    background: #c50500;
}

.ngc-ev-result {
    margin-top: 24px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.ngc-ev-result.yes {
    background: linear-gradient(135deg, #0a1a0a 0%, #151515 100%);
    border: 1px solid #4ade80;
}

.ngc-ev-result.maybe {
    background: linear-gradient(135deg, #1a1a0a 0%, #151515 100%);
    border: 1px solid #facc15;
}

.ngc-ev-result.no {
    background: linear-gradient(135deg, #1a0a0a 0%, #151515 100%);
    border: 1px solid #E10600;
}

.ngc-ev-result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ngc-ev-result.yes .ngc-ev-result-title { color: #4ade80; }
.ngc-ev-result.maybe .ngc-ev-result-title { color: #facc15; }
.ngc-ev-result.no .ngc-ev-result-title { color: #E10600; }

.ngc-ev-result-desc {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.ngc-ev-result-savings {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.ngc-ev-result-savings.positive { color: #4ade80; }
.ngc-ev-result-savings.negative { color: #E10600; }

.ngc-ev-result-period {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.ngc-ev-breakdown {
    margin-top: 20px;
    text-align: left;
}

.ngc-ev-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #222;
    font-size: 13px;
}

.ngc-ev-breakdown-row:last-child {
    border-bottom: none;
}

.ngc-ev-breakdown-label {
    color: #888;
}

.ngc-ev-breakdown-value {
    color: #fff;
    font-weight: 600;
}

/* ==================== */
/* MI COCHE AL MES      */
/* ==================== */

.ngc-mes-container {
    color: #fff;
}

.ngc-mes-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}

.ngc-mes-subtitle {
    color: #888;
    font-size: 13px;
    margin: 0 0 24px;
}

.ngc-mes-section {
    margin-bottom: 20px;
}

.ngc-mes-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ccc;
}

.ngc-mes-input,
.ngc-mes-select {
    width: 100%;
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ngc-mes-input:focus,
.ngc-mes-select:focus {
    outline: none;
    border-color: #E10600;
}

.ngc-mes-select option {
    background: #151515;
    color: #fff;
}

/* Buscador de coches */
.ngc-mes-search-wrap {
    position: relative;
}

.ngc-mes-search {
    width: 100%;
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ngc-mes-search:focus {
    outline: none;
    border-color: #E10600;
}

.ngc-mes-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 10;
}

.ngc-mes-search-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ngc-mes-search-item:last-child {
    border-bottom: none;
}

.ngc-mes-search-item:hover {
    background: #252525;
}

.ngc-mes-search-item.ngc-mes-search-empty {
    color: #666;
    cursor: default;
    font-size: 13px;
}

.ngc-mes-search-item.ngc-mes-search-empty:hover {
    background: transparent;
}

.ngc-mes-search-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.ngc-mes-search-motor {
    color: #ccc;
    font-size: 12px;
    font-weight: 400;
}

.ngc-mes-search-meta {
    color: #888;
    font-size: 12px;
}

/* Consumo manual */
.ngc-mes-consumo-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
}

.ngc-mes-consumo-toggle-wrap input[type="checkbox"] {
    accent-color: #E10600;
    width: 16px;
    height: 16px;
}

.ngc-mes-consumo-hint {
    display: block;
    color: #666;
    font-size: 11px;
    margin-top: 4px;
}

/* Motorización en coche seleccionado */
.ngc-mes-selected-motor {
    color: #ccc;
    font-size: 13px;
}

/* Coche seleccionado */
.ngc-mes-selected-car {
    background: #151515;
    border: 1px solid #E10600;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ngc-mes-selected-name {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.ngc-mes-selected-meta {
    color: #888;
    font-size: 13px;
}

.ngc-mes-selected-remove {
    background: none;
    border: none;
    color: #E10600;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0 0;
    text-align: left;
    transition: opacity 0.2s;
}

.ngc-mes-selected-remove:hover {
    opacity: 0.7;
}

/* Radio buttons */
.ngc-mes-radio-group {
    display: flex;
    gap: 8px;
}

.ngc-mes-radio {
    flex: 1;
    background: #151515;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #ccc;
}

.ngc-mes-radio.selected {
    border-color: #E10600;
    background: #1a1a1a;
    color: #fff;
}

/* Botón calcular */
.ngc-mes-btn {
    width: 100%;
    background: #E10600;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.ngc-mes-btn:hover:not(:disabled) {
    background: #c50500;
}

.ngc-mes-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

/* ==================== */
/* RESULTADOS MI COCHE  */
/* ==================== */

.ngc-mes-fade-in {
    animation: ngcMesFadeIn 0.5s ease;
}

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

.ngc-mes-results-wrap {
    margin-top: 24px;
}

.ngc-mes-results-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
    text-align: center;
}

/* Comparación dos columnas */
.ngc-mes-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ngc-mes-card {
    background: #151515;
    border: 1px solid #252525;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.ngc-mes-card-ev {
    border-color: #4ade80;
    background: linear-gradient(135deg, #0a1a0a 0%, #151515 100%);
}

.ngc-mes-card-header {
    margin-bottom: 12px;
}

.ngc-mes-card-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ngc-mes-badge-current {
    background: #E10600;
    color: #fff;
}

.ngc-mes-badge-ev {
    background: #4ade80;
    color: #000;
}

.ngc-mes-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.ngc-mes-card-meta {
    font-size: 12px;
    color: #888;
}

.ngc-mes-card-total {
    font-size: 28px;
    font-weight: 700;
    color: #E10600;
    margin-bottom: 16px;
    line-height: 1;
}

.ngc-mes-card-total span {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.ngc-mes-total-ev {
    color: #4ade80;
}

/* Desglose */
.ngc-mes-card-breakdown {
    flex: 1;
}

.ngc-mes-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #222;
    font-size: 12px;
    gap: 4px;
}

.ngc-mes-breakdown-row:last-child {
    border-bottom: none;
}

.ngc-mes-breakdown-label {
    color: #888;
    white-space: nowrap;
}

.ngc-mes-breakdown-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.ngc-mes-breakdown-save {
    color: #4ade80;
    font-size: 10px;
    font-weight: 400;
    margin-left: 4px;
}

.ngc-mes-breakdown-extra {
    color: #E10600;
    font-size: 10px;
    font-weight: 400;
    margin-left: 4px;
}

/* Diferencia */
.ngc-mes-diff {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    color: #ccc;
    background: #1a1a1a;
    line-height: 1.5;
}

.ngc-mes-diff-positive {
    border: 1px solid #4ade80;
    color: #4ade80;
}

.ngc-mes-diff-negative {
    border: 1px solid #E10600;
    color: #E10600;
}

.ngc-mes-diff-detail {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-weight: 400;
}

/* Nota */
.ngc-mes-note {
    color: #555;
    font-size: 11px;
    text-align: center;
    margin: 16px 0 0;
    line-height: 1.5;
}

/* Compartir */
.ngc-mes-share {
    text-align: center;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ngc-mes-share-btn {
    background: #222;
    color: #ccc;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.ngc-mes-share-btn:hover {
    background: #333;
    color: #fff;
    border-color: #E10600;
}

.ngc-mes-share-feedback {
    color: #4ade80;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
}

.ngc-mes-share-feedback.visible {
    opacity: 1;
}

/* Recalcular */
.ngc-mes-recalc {
    width: 100%;
    background: none;
    color: #888;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.ngc-mes-recalc:hover {
    color: #fff;
    border-color: #E10600;
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */

@media (max-width: 700px) {
    .ngc-tools-popup.ngc-popup-wide {
        max-width: 100%;
    }
}

@media (max-width: 500px) {
    .ngc-tools-popup {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .ngc-tools-btn {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }

    .ngc-test-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .ngc-test-options.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ngc-ev-radio-group {
        flex-direction: column;
    }

    .ngc-comp-result-breakdown {
        grid-template-columns: 1fr;
    }

    /* Mi coche al mes: stack en móvil */
    .ngc-mes-comparison {
        grid-template-columns: 1fr;
    }

    .ngc-mes-radio-group {
        flex-direction: column;
    }

    .ngc-mes-card-total {
        font-size: 24px;
    }

    .ngc-mes-breakdown-row {
        font-size: 11px;
    }
}
