﻿/* Calculadora */
.dpd-calc {
    font-size: 14px;
    line-height: 1.42857;
    color: #1d1d1d;
    background: #fff;
    padding: 50px 0;
}

.dpd-calc .dpd-wrap {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 15px;
}

.dpd-calc .dp-header {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-bottom: 55px;
}

.dpd-calc .dp-header svg {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 70px;
    height: 86px;
    margin-right: 16px;
    color: #3cb4d8;
}

.dpd-calc .dp-header h2 {
    text-transform: none;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 38px;
    line-height: 1.35;
    font-weight: 400;
    color: #1d1d1d;
}

.dpd-calc .dp-label {
    display: block;
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 18px;
    color: #1d1d1d;
}

.dpd-calc .dp-group {
    margin-bottom: 28px;
}

.dpd-calc .row.dp-tight {
    margin-left: -9px;
    margin-right: -9px;
}

.dpd-calc .row.dp-tight>[class*="col-"] {
    padding-left: 9px;
    padding-right: 9px;
}

/* Botones: se anulan los estilos globales de botones de SharePoint (corev15.css) */
.dpd-calc .dp-btn {
    display: block;
    width: 100%;
    height: 46px;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 2px solid #e3e3e3;
    border-radius: 8px;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: normal;
    color: #1d1d1d;
    cursor: pointer;
    -webkit-transition: border-color .15s, background-color .15s, color .15s;
    transition: border-color .15s, background-color .15s, color .15s;
}

.dpd-calc .dp-btn:hover {
    border-color: #cfcfcf;
    background: #fff;
}

.dpd-calc .dp-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 150, 46, .25);
}

.dpd-calc .dp-btn.active,
.dpd-calc .dp-btn.active:hover {
    border-color: #e8962e;
    background: #fdf3e6;
    color: #e8962e;
}

.dpd-calc .dp-btn-lg {
    height: 80px;
}

.dpd-calc .dp-amount {
    height: 80px;
    margin: 0;
    padding: 6px 12px;
    border: 2px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: none;
    font-family: inherit;
    font-size: 34px;
    text-align: center;
    color: #1d1d1d;
    background: #fff;
}

.dpd-calc .dp-amount:focus {
    border-color: #e8962e;
    box-shadow: 0 0 0 3px rgba(232, 150, 46, .2);
}

.dpd-calc .dp-error {
    color: #c0392b;
    font-size: 13px;
    margin-top: 6px;
}

.dpd-calc .dp-select {
    height: 80px;
    margin: 0;
    padding: 6px 40px 6px 12px;
    border: 2px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: none;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-align-last: center;
    color: #1d1d1d;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 18px center;
    cursor: pointer;
}

.dpd-calc .dp-select::-ms-expand {
    display: none;
}

.dpd-calc .dp-select:focus {
    border-color: #e8962e;
    box-shadow: 0 0 0 3px rgba(232, 150, 46, .2);
}

/* Icono de ayuda: Font Awesome 5 del sitio (far fa-question-circle), como en la sección de beneficios de ISI */
.dpd-calc .dp-help {
    margin-left: 8px;
    font-size: 16px;
    color: #e8962e;
    cursor: pointer;
    vertical-align: middle;
}

/* Si la página no tiene Font Awesome, se dibuja un "?" en un círculo */
.dpd-calc .dp-help.dp-help-fallback {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e8962e;
    color: #fff;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.dpd-calc .dp-help.dp-help-fallback:before {
    content: '?';
}

.dpd-calc .dp-results {
    border-radius: 14px;
    overflow: hidden;
}

.dpd-calc .dp-result {
    background: #ecf3fd;
    text-align: center;
    padding: 24px 15px 18px;
    margin-bottom: 6px;
}

.dpd-calc .dp-result:last-child {
    margin-bottom: 0;
}

.dpd-calc .dp-result-value {
    font-size: 32px;
    color: #4a5466;
    line-height: 1.2;
    margin-bottom: 6px;
}

.dpd-calc .dp-result-label {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1d;
}

/* Estado inicial (antes de que Vue active la sección): se ve igual que con los valores por defecto */
.dpd-calc[data-pending] .dp-default {
    border-color: #e8962e;
    background: #fdf3e6;
    color: #e8962e;
}

.dpd-calc[data-pending] .dp-error,
.dpd-calc[data-pending] .dp-debug {
    display: none;
}

.dpd-calc[data-pending] .dp-result-value:empty:before {
    content: '...';
}

.dpd-calc[data-pending] .dp-amount::-webkit-input-placeholder {
    color: #1d1d1d;
}

.dpd-calc[data-pending] .dp-amount::-moz-placeholder {
    color: #1d1d1d;
    opacity: 1;
}

.dpd-calc[data-pending] .dp-amount:-ms-input-placeholder {
    color: #1d1d1d;
}

.dpd-calc .dp-debug {
    margin-top: 10px;
    padding: 8px;
    font-size: 11px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    background: #fff8e1;
    border: 1px solid #e8962e;
    color: #333;
}

/* Tooltip de Bootstrap 3 (el del sitio) con el estilo de la sección de beneficios de ISI */
.dpd-calc .tooltip {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
}

.dpd-calc .tooltip-inner {
    max-width: 200px;
    padding: 20px 15px;
    color: #000;
    text-align: center;
    background-color: #eaf5ff;
    border: 1px solid #28b0ff;
    border-radius: 4px;
}

.dpd-calc .tooltip.bottom .tooltip-arrow {
    border-bottom-color: #eaf5ff;
}

.dpd-calc .tooltip.top .tooltip-arrow {
    border-top-color: #eaf5ff;
}

.dpd-calc .tooltip.in {
    opacity: 1;
}

.dpd-calc .dp-results {
    overflow: visible;
}

.dpd-calc .dp-result:first-child {
    border-radius: 14px 14px 0 0;
}

.dpd-calc .dp-result:last-child {
    border-radius: 0 0 14px 14px;
}

@media (max-width:991px) {
    .dpd-calc .dp-results {
        margin-top: 20px;
    }
}

@media (max-width:767px) {
    .dpd-calc {
        padding: 30px 0;
    }

    .dpd-calc .dp-header {
        margin-bottom: 30px;
    }

    .dpd-calc .dp-header svg {
        width: 50px;
        height: 62px;
    }

    .dpd-calc .dp-header h2 {
        font-size: 24px;
    }

    .dpd-calc .dp-amount {
        font-size: 26px;
        height: 64px;
    }

    .dpd-calc .dp-btn-lg,
    .dpd-calc .dp-select {
        height: 64px;
        font-size: 18px;
    }

    .dpd-calc .dp-result-value {
        font-size: 26px;
    }

    .dpd-calc .dp-result-label {
        font-size: 17px;
    }

    .dpd-calc .dp-plazo {
        margin-bottom: 28px;
    }
}