/* ============================================================
   DESIGN SYSTEM - LIBRERÍA DE ESTILOS REUTILIZABLES
   Estilo PayPal Minimalista con color azul #003087
   ============================================================ */

/* =====================================================
   MODAL UTILITIES
   ===================================================== */

/* Modal Container - Base para todos los modales */
.modal-container {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 150;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-container.active {
    display: flex;
}

.modal-container.active-flex {
    display: flex !important;
}

/* Modal Box - Caja principal del modal */
.modal-box {
    background: white;
    border-radius: 8px;
    width: 95%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-box.modal-box-lg {
    max-width: 900px;
}

.modal-box.modal-box-md {
    max-width: 600px;
}

/* Modal Header - Encabezado con fondo azul */
.modal-header {
    background: #003087;
    color: white;
    padding: 2rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

.modal-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

.modal-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.modal-header .close-btn:hover {
    opacity: 0.7;
}

/* Modal Content - Área de contenido con padding */
.modal-content {
    padding: 2rem;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Modal Footer - Pie de modal */
.modal-footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 0 0 8px 8px;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* =====================================================
   FORM INPUTS
   ===================================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    color: #1f2937;
    font-weight: 500;
    transition: all 0.2s;
}

.form-input:hover {
    border-color: #9ca3af;
}

.form-input:focus {
    outline: none;
    border-color: #003087;
    box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input.error {
    border-color: #dc2626;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* =====================================================
   BUTTONS
   ===================================================== */

/* Botón Primario - Azul #003087 */
.btn-primary {
    padding: 0.75rem 2rem;
    background: #003087;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background-color: #001a4d;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Botón Secundario - Borde */
.btn-secondary {
    padding: 0.75rem 2rem;
    background: white;
    border: 1px solid #cbd5e0;
    color: #475569;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Botón Ghost - Texto simple */
.btn-ghost {
    padding: 0.75rem 2rem;
    background: transparent;
    color: #003087;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-ghost:hover {
    background: #f3f4f6;
}

/* =====================================================
   ALERTS & MESSAGES
   ===================================================== */

/* Error Message */
.alert-error {
    display: none;
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 1rem;
    border-radius: 6px;
}

.alert-error.show {
    display: block;
}

.alert-error p {
    color: #991b1b;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

/* Info Box */
.alert-info {
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 6px;
    color: #003087;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.alert-info.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

.rounded-sm { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }

.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.2); }

/* =====================================================
   COLORS - PALETA DE COLORES
   ===================================================== */

.color-primary { color: #003087; }
.color-success { color: #10b981; }
.color-error { color: #dc2626; }
.color-warning { color: #f59e0b; }
.color-info { color: #3b82f6; }

.bg-primary { background-color: #003087; }
.bg-success { background-color: #10b981; }
.bg-error { background-color: #dc2626; }
.bg-warning { background-color: #f59e0b; }
.bg-info { background-color: #3b82f6; }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .modal-box {
        width: 90%;
    }

    .modal-box.modal-box-lg {
        max-width: 100%;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
    }
}
