/*
|--------------------------------------------------------------------------
| CONTENEDOR GENERAL
|--------------------------------------------------------------------------
*/

.moyano-calculadora,
.moyano-calculadora * {
    box-sizing: border-box;
}

.moyano-calculadora {
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.moyano-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: start;
    max-width: 100%;
    min-width: 0;
}

.moyano-row,
.moyano-col {
    min-width: 0;
}

@media (max-width: 1100px) {
    .moyano-grid {
        grid-template-columns: 1fr;
    }
}

/*
|--------------------------------------------------------------------------
| TARJETAS
|--------------------------------------------------------------------------
*/

.moyano-card,
.moyano-resultado-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    border: 1px solid #e9eef4;
}

.moyano-card-header {
    margin-bottom: 24px;
}

.moyano-card-header .moyano-subtitulo {
    margin: 0;
    color: #334463;
    font-size: 15px;
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| TITULO
|--------------------------------------------------------------------------
*/

.moyano-titulo {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #006AB4 !important;
}

/*
|--------------------------------------------------------------------------
| CAMPOS
|--------------------------------------------------------------------------
*/

.moyano-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

.moyano-row.full-width {
    grid-template-columns: 1fr;
}

.moyano-col {
    width: 100%;
}

@media (max-width: 768px) {
    .moyano-row {
        grid-template-columns: 1fr;
    }
}

.moyano-campo {
    margin-bottom: 22px;
}

.moyano-campo label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #006AB4 !important;
    line-height: 1.4 !important;
    text-transform: none !important;
}

/*
|--------------------------------------------------------------------------
| INPUTS
|--------------------------------------------------------------------------
*/

.moyano-calculadora input[type="number"],
.moyano-calculadora select,
.moyano-calculadora .tom-select .ts-control {
    width: 100%;
    height: 52px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    padding: 0 15px;
    font-size: 15px;
    background: #fff;
}

.moyano-select {
    min-height: 52px;
}

.moyano-nota {
    margin: 8px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.fuel-price {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: 0;
}

.fuel-price-prefix,
.fuel-price-suffix {
    font-size: 12px;
    color: #006AB4;
    font-weight: 600;
    white-space: nowrap;
}

.fuel-price-input {
    width: clamp(56px, 8vw, 82px);
    max-width: 100%;
    min-width: 58px;
    height: 36px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    padding: 0 8px;
    font-size: 14px;
    color: #102a43;
    text-align: center;
    background: #fff;
}

.moyano-option-card.active .fuel-price-input {
    border-color: #006AB4;
}

.moyano-combustible {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    padding-bottom: 8px;
    max-width: 100%;
}

.moyano-option-card {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 230px;
    background: #ffffff;
    border: 1px solid #006AB4;
    border-radius: 18px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    padding: 14px 14px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.moyano-option-card .fuel-name {
    display: block;
    color: #006AB4;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    text-align: center;
}

.moyano-option-card .fuel-price {
    margin-top: 0;
}

@media (max-width: 1440px) {
    .moyano-combustible {
        gap: 8px;
        justify-content: center;
    }

    .moyano-option-card {
        flex: 1 1 220px;
        min-width: 0;
        max-width: 220px;
    }

    .fuel-price {
        gap: 6px;
    }

    .fuel-price-input {
        width: 68px;
        max-width: 68px;
    }
}

@media (max-width: 1024px) {
    .moyano-combustible {
        gap: 6px;
    }

    .moyano-option-card {
        flex: 1 1 0;
        min-width: 0;
        max-width: 180px;
    }

    .fuel-price {
        gap: 4px;
        min-width: 0;
    }

    .fuel-price-prefix,
    .fuel-price-suffix {
        font-size: 12px;
    }

    .fuel-price-input {
        width: 60px;
        max-width: 60px;
        font-size: 13px;
        height: 36px;
        padding: 0 8px;
    }
}

@media (max-width: 768px) {
    .moyano-combustible {
        flex-wrap: wrap;
        justify-content: center;
    }

    .moyano-option-card {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }

    .fuel-price {
        gap: 6px;
    }

    .fuel-price-input {
        width: 72px;
        max-width: 72px;
        font-size: 14px;
        height: 38px;
    }
}

@media (max-width: 576px) {
    .moyano-option-card {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }

    .fuel-price {
        gap: 4px;
    }

    .fuel-price-prefix,
    .fuel-price-suffix {
        font-size: 12px;
    }

    .fuel-price-input {
        width: 66px;
        max-width: 66px;
        font-size: 13px;
        height: 36px;
    }
}

.moyano-option-card:hover {
    border-color: #005f96;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 106, 180, .08);
}

.moyano-option-card.active {
    background: #e9f8ee;
    border-color: #1a8d4c;
    border-width: 2px;
    color: #0e4e2c;
    box-shadow: 0 12px 28px rgba(26, 141, 76, .18);
}

/*
|--------------------------------------------------------------------------
| TOM SELECT
|--------------------------------------------------------------------------
*/

.moyano-calculadora .ts-control {
    min-height: 52px;
    border-radius: 12px;
    border: 1px solid #dbe3ec !important;
    box-shadow: none !important;
}

.moyano-calculadora .ts-control .items {
    min-height: 52px;
}

.moyano-calculadora .ts-wrapper.focus .ts-control {
    border-color: #006AB4 !important;
}

.moyano-calculadora .ts-dropdown {
    max-height: 260px;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
}

.moyano-calculadora .ts-dropdown .ts-option {
    padding: 12px 16px;
}

.moyano-calculadora .ts-dropdown .ts-option.ts-selected,
.moyano-calculadora .ts-dropdown .ts-option.ts-focus {
    background: #f0f7ff;
}

/*
|--------------------------------------------------------------------------
| BOTON
|--------------------------------------------------------------------------
*/

.moyano-boton {
    margin-top: 25px;
}

#btn-calcular {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: #006AB4;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .25s ease;
}

#btn-calcular:hover {
    opacity: .92;
}

#btn-calcular:disabled {
    opacity: .7;
    cursor: not-allowed;
}
.moyano-popup-overlay,
.moyano-popup {
    display: none;
    opacity: 0;
    pointer-events: none;
}

body.moyano-popup-open {
    overflow: hidden;
}

.moyano-popup-overlay.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
    position: fixed;
    inset: 0;
    background: rgba(2, 20, 40, .45);
    z-index: 9998;
}

.moyano-popup.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: min(420px, calc(100% - 32px));
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
    padding: 28px 24px;
    z-index: 9999;
    transition: opacity .2s ease, transform .2s ease;
}

.moyano-popup {
    transform: translate(-50%, -50%) scale(.95);
}

.moyano-popup-close {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #334463;
    font-size: 24px;
    cursor: pointer;
}

.moyano-popup-body {
    text-align: center;
    padding-top: 10px;
}

.moyano-popup-icon {
    font-size: 40px;
    margin-bottom: 18px;
}

.moyano-popup h3 {
    margin: 0 0 14px;
    font-size: 22px;
    color: #102a43;
}

.moyano-popup-message {
    margin: 0 0 22px;
    color: #334463;
    font-size: 15px;
    line-height: 1.6;
}

.moyano-popup-button {
    min-width: 120px;
    border: none;
    border-radius: 12px;
    background: #006AB4;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
}
/*
|--------------------------------------------------------------------------
| RESULTADO
|--------------------------------------------------------------------------
*/

.moyano-resultado-placeholder {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 24px;
    color: #334463;
}

.moyano-resultado-placeholder .resultado-icono {
    font-size: 40px;
}

.resultado-wrapper {
    display: grid;
    gap: 18px;
}

.resultado-titulo {
    margin: 0;
    font-size: 22px;
    color: #102a43;
    font-weight: 700;
}

.resultado-bloque {
    background: #f8fbff;
    border-radius: 14px;
    border: 1px solid #dbe3ec;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.resultado-bloque span {
    color: #334463;
    font-size: 14px;
}

.resultado-bloque strong {
    color: #102a43;
    font-size: 16px;
}

.resultado-bloque.ahorro {
    border-color: #b7e4ff;
    background: #edf7ff;
}

.resultado-porcentaje {
    font-size: 18px;
    font-weight: 700;
    color: #006AB4;
}

#resultado-default{
    text-align:center;
}

#resultado-default img{
    width:100%;
    max-width:420px;
    display:block;
    margin:0 auto 20px;
    border-radius:12px;
}

#resultado-default h4{
    margin:15px 0 10px;
    font-size:24px !important;
    color:#006AB4 !important;
}

#resultado-default p{
    margin:0;
    color:#666;
    line-height:1.7;
}

/*
|--------------------------------------------------------------------------
| RESULTADOS AJAX
|--------------------------------------------------------------------------
*/

.resultado-wrapper{
    text-align:center;
}

.resultado-icono{
    font-size:50px;
    margin-bottom:15px;
}

.resultado-titulo{
    color:#006AB4 !important;
    font-size:28px !important;
    font-weight:700 !important;
    margin-bottom:25px !important;
}

.resultado-bloque{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px;
    border-radius:10px;
    background:#f7f9fc;
    margin-bottom:12px;
}

.resultado-label{
    font-weight:600;
}

.resultado-bloque strong{
    font-size:18px;
}

.resultado-bloque.ahorro{
    background:#eef9f1;
}

.resultado-bloque.ahorro-anual{
    background:#e8f4ff;
}
.resultado-bloque.ahorro-compuesto {
    background: #eef6ff;
    border-color: #bfdbfe;
    flex-direction: column;
    align-items: stretch;
    padding: 6px 8px;
    gap: 4px;
    box-sizing: border-box;
}

.resultado-label.resultado-label-blue {
    display: block;
    color: #006AB4;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.resultado-ahorro-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 0;
    width: 100%;
    align-items: stretch;
}

.resultado-ahorro-item {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    padding: 6px 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px;
    line-height: 1.05;
    box-sizing: border-box;
}

.resultado-ahorro-item.gnv {
    background: #dcfce7;
    border-color: #86efac;
}

.resultado-ahorro-item.glp {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.resultado-ahorro-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 auto;
}

.resultado-ahorro-title {
    display: block;
    color: #334463;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.resultado-ahorro-percent {
    color: #0c4a6e;
    font-size: 15px;
    font-weight: 800;
}

.resultado-ahorro-subtitle {
    color: #334463;
    font-size: 11px;
    font-weight: 600;
}

.resultado-ahorro-amount {
    color: #0b4a7e;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: 0;
}

@media (max-width: 576px) {
    .resultado-ahorro-list {
        display: block;
        width: 100%;
    }

    .resultado-ahorro-item {
        display: block;
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 8px;
        padding: 8px 10px;
    }

    .resultado-ahorro-item:last-child {
        margin-bottom: 0;
    }
}
.resultado-table-wrapper {
    overflow-x: auto;
    margin-bottom: 16px;
}

.resultado-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    overflow: hidden;
    table-layout: fixed;
    min-width: 0;
}

.resultado-table th,
.resultado-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e6edf6;
    color: #102a43;
    font-size: 15px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}

.resultado-table th {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 2px solid rgba(255,255,255,.12);
}

.resultado-table thead th:nth-child(1) {
    background: #334155;
}

.resultado-table thead th:nth-child(2) {
    background: #1d4ed8;
}

.resultado-table thead th:nth-child(3) {
    background: #0c4a6e;
}

.resultado-table thead th:nth-child(4) {
    background: #15803d;
}

.resultado-table tbody tr:nth-child(odd) {
    background: #f8fafc;
}

.resultado-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.resultado-table tbody td:nth-child(1) {
    background: #f1f5f9;
    color: #0f172a;
}

.resultado-table tbody td:nth-child(2) {
    background: #dbeafe;
    color: #1d4ed8;
}

.resultado-table tbody td:nth-child(3) {
    background: #e0f2fe;
    color: #0c4a6e;
}

.resultado-table tbody td:nth-child(4) {
    background: #dcfce7;
    color: #14532d;
}

.resultado-table td {
    font-weight: 600;
}

.resultado-table td:first-child {
    font-weight: 700;
}

.resultado-encabezado {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 20px;
}

.resultado-texto {
    margin: 0;
    color: #334463;
    font-size: 15px;
    line-height: 1.6;
}

.resultado-bloque.resumen {
    padding: 20px;
    margin-bottom: 20px;
}

.resultado-table-wrapper {
    margin-bottom: 20px;
}

.resultado-porcentaje {
    margin-top: 0;
    color: #102a43;
    font-size: 16px;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width:991px){

    .moyano-grid{
        grid-template-columns:1fr;
    }

    .moyano-card,
    .moyano-resultado-card{
        padding:22px;
    }

    .moyano-titulo{
        font-size:24px !important;
    }

    .moyano-gasto{
        grid-template-columns:repeat(2,1fr);
    }

    .moyano-option-card{
        min-width:auto;
        max-width: 240px;
    }

    .resultado-encabezado {
        grid-template-columns: 1fr;
    }

    .resultado-encabezado .resultado-icono {
        justify-self: center;
    }

    .resultado-bloque.ahorro-compuesto .resultado-ahorro-list {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .resultado-bloque.ahorro-compuesto .resultado-ahorro-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 100% !important;
        box-sizing: border-box;
    }

    .resultado-table th,
    .resultado-table td {
        font-size: 14px;
        padding: 12px 10px;
    }
}

@media (max-width:576px){

    .moyano-combustible{
        flex-direction:column;
        align-items: stretch;
    }

    .moyano-option-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .resultado-ahorro-list {
        flex-direction: column;
    }

    .resultado-ahorro-item {
        flex: 0 0 100%;
        width: 100%;
        min-width: auto;
    }

    .moyano-gasto{
        grid-template-columns:1fr;
    }

    .resultado-bloque{
        flex-direction:column;
        gap:6px;
    }

    .resultado-bloque strong{
        font-size:18px;
    }

    .resultado-table th,
    .resultado-table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .resultado-table {
        display: block;
        width: 100%;
    }

    .resultado-table-wrapper {
        overflow-x: auto;
    }
}