/**
 * Institutional Payment Manager - Frontend Styles
 *
 * @package Institutional_Payment_Manager
 * @version 1.0.0
 */

/* Variables CSS con colores institucionales */
:root {
    --ipm-primary: #003b74;
    --ipm-secondary: #2c98d4;
    --ipm-accent: #83b5e3;
    --ipm-red: #da2026;
    --ipm-magenta: #cf358c;
    --ipm-white: #ffffff;
    --ipm-gray-light: #f8f9fa;
    --ipm-gray: #e9ecef;
    --ipm-text: #212529;
    --ipm-text-light: #6c757d;
    --ipm-success: #28a745;
    --ipm-warning: #ffc107;
    --ipm-danger: #dc3545;
    --ipm-border-radius: 8px;
    --ipm-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Contenedor principal */
.ipm-frontend-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header institucional */
.ipm-institution-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--ipm-primary), var(--ipm-secondary));
    color: var(--ipm-white);
    border-radius: var(--ipm-border-radius);
    margin-bottom: 30px;
}

.ipm-institution-header img {
    max-height: 80px;
    margin-bottom: 15px;
}

.ipm-institution-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.ipm-institution-header p {
    margin: 0;
    opacity: 0.9;
}

/* Cards */
.ipm-card {
    background: var(--ipm-white);
    border-radius: var(--ipm-border-radius);
    box-shadow: var(--ipm-shadow);
    padding: 25px;
    margin-bottom: 20px;
}

.ipm-card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ipm-gray);
}

.ipm-card-header h2 {
    margin: 0;
    color: var(--ipm-primary);
    font-size: 20px;
}

.ipm-card-header p {
    margin: 5px 0 0;
    color: var(--ipm-text-light);
    font-size: 14px;
}

/* Cards de estudiantes */
.ipm-student-card {
    background: var(--ipm-white);
    border-radius: var(--ipm-border-radius);
    box-shadow: var(--ipm-shadow);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--ipm-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ipm-student-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ipm-student-card.selected {
    border-left-color: var(--ipm-success);
    background: #f8fff8;
}

.ipm-student-card h3 {
    margin: 0 0 10px;
    color: var(--ipm-primary);
}

.ipm-student-card .student-info {
    color: var(--ipm-text-light);
    font-size: 14px;
}

.ipm-student-card .student-info span {
    margin-right: 15px;
}

/* Cards de servicios */
.ipm-service-card {
    background: var(--ipm-white);
    border-radius: var(--ipm-border-radius);
    box-shadow: var(--ipm-shadow);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ipm-service-card .service-info h3 {
    margin: 0 0 10px;
    color: var(--ipm-primary);
}

.ipm-service-card .service-info p {
    margin: 0;
    color: var(--ipm-text-light);
    font-size: 14px;
}

.ipm-service-card .service-price {
    text-align: right;
}

.ipm-service-card .service-price .amount {
    font-size: 24px;
    font-weight: bold;
    color: var(--ipm-primary);
}

.ipm-service-card .service-price .currency {
    font-size: 14px;
    color: var(--ipm-text-light);
}

/* Formularios */
.ipm-form {
    max-width: 500px;
}

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

.ipm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--ipm-text);
}

.ipm-form-group input[type="text"],
.ipm-form-group input[type="email"],
.ipm-form-group input[type="password"],
.ipm-form-group input[type="number"],
.ipm-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--ipm-gray);
    border-radius: var(--ipm-border-radius);
    font-size: 16px;
}

.ipm-form-group input:focus,
.ipm-form-group select:focus {
    outline: none;
    border-color: var(--ipm-secondary);
    box-shadow: 0 0 0 3px rgba(44, 152, 212, 0.2);
}

.ipm-form-group .ipm-error {
    color: var(--ipm-danger);
    font-size: 13px;
    margin-top: 5px;
}

/* Botones */
.ipm-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--ipm-border-radius);
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.ipm-btn-primary {
    background: var(--ipm-primary);
    color: var(--ipm-white);
}

.ipm-btn-primary:hover {
    background: var(--ipm-secondary);
    color: var(--ipm-white);
}

.ipm-btn-secondary {
    background: var(--ipm-gray);
    color: var(--ipm-text);
}

.ipm-btn-secondary:hover {
    background: var(--ipm-gray-light);
}

.ipm-btn-success {
    background: var(--ipm-success);
    color: var(--ipm-white);
}

.ipm-btn-success:hover {
    background: #218838;
}

.ipm-btn-block {
    display: block;
    width: 100%;
}

/* Búsqueda */
.ipm-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ipm-search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--ipm-gray);
    border-radius: var(--ipm-border-radius);
    font-size: 16px;
}

.ipm-search-form select {
    padding: 12px 15px;
    border: 1px solid var(--ipm-gray);
    border-radius: var(--ipm-border-radius);
    font-size: 16px;
    min-width: 150px;
}

/* Mensajes */
.ipm-message {
    padding: 15px 20px;
    border-radius: var(--ipm-border-radius);
    margin-bottom: 20px;
}

.ipm-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ipm-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ipm-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Badges */
.ipm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ipm-badge-success {
    background: #d4edda;
    color: #155724;
}

.ipm-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.ipm-badge-danger {
    background: #f8d7da;
    color: #721c24;
}


/* Alertas flotantes (Toast) */
.ipm-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--ipm-border-radius);
    background: var(--ipm-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: ipmSlideIn 0.3s ease-out;
}

@keyframes ipmSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.ipm-toast-success {
    border-left: 4px solid var(--ipm-success);
}

.ipm-toast-error {
    border-left: 4px solid var(--ipm-danger);
}

.ipm-toast-warning {
    border-left: 4px solid var(--ipm-warning);
}

/* Loader */
.ipm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ipmSpin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Estados de botones */
.ipm-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Utilidades */
.ipm-text-center { text-align: center; }
.ipm-mt-20 { margin-top: 20px; }
.ipm-mb-20 { margin-bottom: 20px; }

