/* ─── Risco Presupuesto Email — Frontend Styles ─── */

.risco-pres-widget {
    display: inline-block;
}

/* Botón trigger */
.risco-pres-btn {
    display: inline-block;
    padding: 14px 32px;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}

.risco-pres-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.08);
}

.risco-pres-btn:active {
    transform: translateY(0);
}

/* Modal overlay */
.risco-pres-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

.risco-pres-modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px 30px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: riscoModalIn 0.3s ease;
}

@keyframes riscoModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.risco-pres-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.risco-pres-modal-close:hover {
    color: #333;
}

.risco-pres-modal-content h3 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #1a1a2e;
    font-weight: 700;
}

.risco-pres-subtitle {
    margin: 0 0 22px;
    color: #c9a84c;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Formulario */
.risco-pres-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.risco-pres-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.risco-pres-field input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.risco-pres-field input:focus {
    outline: none;
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.risco-pres-field input.risco-pres-error {
    border-color: #e74c3c;
}

.risco-pres-error-msg {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 3px;
}

/* Resumen del presupuesto */
.risco-pres-resumen {
    background: #f8f8fa;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #eee;
}

.risco-pres-resumen-linea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
    color: #555;
}

.risco-pres-resumen-linea strong {
    color: #1a1a2e;
    font-size: 16px;
}

.risco-pres-cuota {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

.risco-pres-cuota strong {
    color: #c9a84c !important;
    font-size: 20px !important;
}

/* Botón submit */
.risco-pres-btn-submit {
    width: 100%;
    padding: 15px;
    margin-top: 6px;
    font-size: 15px;
}

.risco-pres-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Legal */
.risco-pres-legal-mini {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin: 8px 0 0;
    line-height: 1.4;
}

.risco-pres-legal-mini a {
    color: #777;
    text-decoration: underline;
}

/* Success state */
.risco-pres-success {
    text-align: center;
    padding: 30px 20px;
}

.risco-pres-check {
    width: 60px;
    height: 60px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 15px;
    animation: riscoCheckPop 0.4s ease;
}

@keyframes riscoCheckPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.risco-pres-success h3 {
    color: #27ae60;
}

.risco-pres-success p {
    color: #666;
    font-size: 14px;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .risco-pres-modal-content {
        padding: 25px 20px;
        border-radius: 8px;
    }

    .risco-pres-modal-content h3 {
        font-size: 19px;
    }

    .risco-pres-cuota strong {
        font-size: 17px !important;
    }
}
