/* ============================================================================
   OPENPAY DONATE - ESTILOS FRONTEND
   ============================================================================ */

* {
    box-sizing: border-box;
}

/* ============================================================================
   BOTÓN: Abre el modal de donación
   ============================================================================ */
.nr-donate-btn-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #042e58 0%, #032240 100%);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(4, 46, 88, 0.25);
    white-space: nowrap;
}

.nr-donate-btn-open:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 46, 88, 0.35);
    background: linear-gradient(135deg, #032240 0%, #021830 100%);
}

.nr-donate-btn-open:active {
    transform: translateY(0);
}

.nr-donate-btn-open:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   MODAL: Contenedor principal
   ============================================================================ */
.nr-openpay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: nr-fade-in 0.3s ease;
}

.nr-openpay-modal.nr-openpay-modal-active {
    display: flex;
}

/* Animación: Fade In (Backdrop) */
@keyframes nr-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contenido del Modal */
.nr-openpay-modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    position: relative;
    animation: nr-slide-up 0.3s ease;
}

/* Animación: Slide Up (Modal) */
@keyframes nr-slide-up {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Botón Cerrar Modal */
.nr-openpay-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.nr-openpay-modal-close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

/* ============================================================================
   HEADER: Encabezado del formulario
   ============================================================================ */
.nr-openpay-header {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    padding: 30px 24px;
    text-align: center;
    border-bottom: 1px solid #004a8f;
}

.nr-openpay-header h2 {
    margin: 12px 0 0 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.nr-openpay-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
}

.nr-openpay-logo svg {
    color: #ffffff;
}

/* ============================================================================
   FORMULARIO: Contenedor de inputs
   ============================================================================ */
.nr-openpay-form {
    padding: 28px 24px;
}

.nr-form-group {
    margin-bottom: 20px;
}

.nr-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nr-form-group small {
    display: block;
    font-size: 12px;
    color: #666666;
    margin-top: 6px;
}

/* Input Fields */
.nr-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #1a1a1a;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #ffffff;
}

.nr-input::placeholder {
    color: #999999;
}

.nr-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: #ffffff;
    color: #1a1a1a;
}

.nr-input:hover {
    border-color: #d0d0d0;
}

/* Project Display */
.nr-project-display {
    padding: 12px 14px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5f7ff 100%);
    border-radius: 6px;
    border: 1px solid #d9e3ff;
    font-size: 14px;
    color: #0066cc;
    font-weight: 600;
}


/* ============================================================================
   MONEY INPUT: Campo de monto con símbolo $
   ============================================================================ */
.nr-input-money {
    position: relative;
    display: flex;
    align-items: center;
}

.nr-currency {
    position: absolute;
    left: 14px;
    font-size: 18px;
    font-weight: 600;
    color: #0066cc;
    pointer-events: none;
}

.nr-input-money .nr-input {
    padding-left: 32px;
}

/* ============================================================================
   BOTÓN: Continuar con Openpay
   ============================================================================ */
.nr-btn-donate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.nr-btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

.nr-btn-donate:active {
    transform: translateY(0);
}

.nr-btn-donate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   MESSAGES: Mensajes de error y éxito
   ============================================================================ */
.nr-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    display: none;
}

.nr-message.error {
    display: block;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.nr-message.success {
    display: block;
    background-color: #efe;
    color: #3a3;
    border: 1px solid #cfc;
}

/* ============================================================================
   FOOTER: Información de seguridad
   ============================================================================ */
.nr-openpay-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 12px;
    color: #666666;
}

.nr-openpay-footer svg {
    color: #0066cc;
    flex-shrink: 0;
}

.nr-openpay-footer p {
    margin: 0;
    line-height: 1.4;
}

/* ============================================================================
   LOADING STATE: Estado de carga
   ============================================================================ */
.nr-btn-donate.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ============================================================================
   RESPONSIVE: Diseño móvil
   ============================================================================ */
@media (max-width: 480px) {
    .nr-openpay-modal-content {
        border-radius: 12px 12px 0 0;
        max-width: 100%;
    }

    .nr-openpay-donate-container {
        padding: 12px;
    }

    .nr-openpay-header {
        padding: 24px 18px;
    }

    .nr-openpay-header h2 {
        font-size: 18px;
    }

    .nr-openpay-form {
        padding: 20px 18px;
    }

    .nr-form-group {
        margin-bottom: 16px;
    }

    .nr-donate-btn-open {
        display: inline-flex;
        justify-content: center;
        padding: 9px 16px;
        font-size: 12px;
    }
}
