/**
 * Modal de Financiamiento WTM (Welcome to Medellin)
 * Widget fijo en esquina inferior derecha
 * Colores: #002868 (azul principal), #fcd116 (amarillo)
 * Fuente: Inter Tight
 */

/* Modal Container - Fixed en esquina inferior derecha */
.wtm-financing-modal {
    position: fixed;
    bottom: 140px;
    right: 20px;
    z-index: 999999;
    font-family: "Inter Tight", Sans-serif;
}

/* NO hay overlay - es un widget de página */
.wtm-financing-overlay {
    display: none;
}

/* Content Box - Widget compacto */
.wtm-financing-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 40, 104, 0.25);
    padding: 30px;
    width: 380px;
    max-height: 600px;
    overflow-y: auto;
    animation: wtmSlideIn 0.4s ease-out;
    border: 2px solid #fcd116;
}

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

/* Close Button */
.wtm-financing-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #002868;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.wtm-financing-close:hover {
    background: rgba(0, 40, 104, 0.1);
    transform: rotate(90deg);
}

/* Initial View */
.wtm-financing-initial {
    text-align: center;
    padding: 10px 0;
}

.wtm-financing-title {
    font-size: 22px;
    font-weight: 700;
    color: #002868;
    margin: 0 0 12px 0;
    line-height: 1.3;
    padding-right: 30px;
}

.wtm-financing-subtitle {
    font-size: 16px;
    color: #002868;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.wtm-financing-cta-btn {
    background: #fcd116;
    color: #002868;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Inter Tight", Sans-serif;
    box-shadow: 0 4px 15px rgba(252, 209, 22, 0.35);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wtm-financing-cta-btn:hover {
    background: #e8c013;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 209, 22, 0.5);
}

/* Form Container */
.wtm-financing-form-container {
    padding: 10px 0;
}

#wtm-financing-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wtm-form-group {
    position: relative;
}

.wtm-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: "Inter Tight", Sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.wtm-form-input:focus {
    outline: none;
    border-color: #002868;
    box-shadow: 0 0 0 4px rgba(0, 40, 104, 0.1);
    background: #ffffff;
}

.wtm-form-input::placeholder {
    color: #999;
    font-weight: 400;
}

button.wtm-financing-submit-btn,
.wtm-financing-submit-btn {
    background: #002868 !important;
    background-color: #002868 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: "Inter Tight", Sans-serif !important;
    margin-top: 10px !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: block !important;
    box-shadow: 0 4px 15px rgba(0, 40, 104, 0.3) !important;
}

button.wtm-financing-submit-btn:hover,
.wtm-financing-submit-btn:hover {
    background: #001a4d !important;
    background-color: #001a4d !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 40, 104, 0.4) !important;
    border: none !important;
}

.wtm-financing-submit-btn:disabled {
    background: #ccc !important;
    background-color: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Success View */
.wtm-financing-success {
    text-align: center;
    padding: 30px 20px;
}

.wtm-success-icon {
    width: 70px;
    height: 70px;
    background: #fcd116;
    color: #002868;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
    margin: 0 auto 15px;
    animation: wtmSuccessPulse 0.6s ease-out;
}

@keyframes wtmSuccessPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.wtm-success-message {
    font-size: 16px;
    color: #002868;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .wtm-financing-modal {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .wtm-financing-content {
        width: 100%;
        max-width: 100%;
        padding: 25px 20px;
    }

    .wtm-financing-title {
        font-size: 20px;
    }

    .wtm-financing-subtitle {
        font-size: 15px;
    }

    .wtm-financing-cta-btn,
    .wtm-financing-submit-btn {
        font-size: 15px;
        padding: 12px 28px;
    }
}

@media (max-width: 480px) {
    .wtm-financing-modal {
        bottom: 0;
        right: 0;
        left: 0;
    }

    .wtm-financing-content {
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }
}

/* Loading State */
.wtm-financing-submit-btn.loading {
    position: relative;
    color: transparent;
}

.wtm-financing-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: wtmSpinner 0.8s linear infinite;
}

@keyframes wtmSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar personalizado */
.wtm-financing-content::-webkit-scrollbar {
    width: 6px;
}

.wtm-financing-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.wtm-financing-content::-webkit-scrollbar-thumb {
    background: #002868;
    border-radius: 10px;
}

.wtm-financing-content::-webkit-scrollbar-thumb:hover {
    background: #003a8c;
}

/* Estado minimizado (opcional para futuro) */
.wtm-financing-modal.minimized .wtm-financing-content {
    width: 60px;
    height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: #fcd116;
}

.wtm-financing-modal.minimized .wtm-financing-initial,
.wtm-financing-modal.minimized .wtm-financing-form-container,
.wtm-financing-modal.minimized .wtm-financing-success,
.wtm-financing-modal.minimized .wtm-financing-close {
    display: none;
}
