/* 
 * Estilos Frontend de Postulaciones - Bolsa de Empleo UEES
 * Diseño moderno y coherente con la plataforma
 */

/* Variables de color - Colores UEES */
:root {
    --uees-primary: #003d82;
    --uees-secondary: #fdb913;
    --uees-accent: #00aeef;
    --uees-dark: #1a1a1a;
    --uees-light: #f5f5f5;
    --uees-success: #28a745;
    --uees-warning: #ffc107;
    --uees-danger: #dc3545;
}

/* Aplicaciones Frontend */
.wpjb-applications-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tarjetas de Estadísticas */
.wpjb-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wpjb-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.wpjb-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--uees-primary), var(--uees-accent));
}

.wpjb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.wpjb-stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--uees-primary);
    margin-bottom: 8px;
    display: block;
}

.wpjb-stat-card .stat-label {
    color: #666;
    font-size: 13px;
    font-weight: 500;
    display: block;
}

/* Filtros */
.wpjb-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.wpjb-filters label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.wpjb-filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: white;
    font-weight: 500;
}

.wpjb-filter-select:focus {
    border-color: var(--uees-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

.wpjb-filter-select:hover {
    border-color: var(--uees-accent);
}

/* Lista de Postulaciones */
.wpjb-applications-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.wpjb-application-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid #999;
}

.wpjb-application-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.wpjb-application-card .app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.wpjb-application-card .app-candidate {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex: 1;
}

.wpjb-application-card .app-candidate h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.wpjb-application-card .app-candidate img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.wpjb-application-card .app-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpjb-application-card .app-meta span {
    color: #666;
    font-size: 13px;
}

.wpjb-application-card .app-status {
    margin-left: 15px;
}

.wpjb-application-card .app-status .status-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #999;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Botones */
.wpjb-btn,
.wpjb-btn-small,
.wpjb-view-cv-btn,
.wpjb-btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wpjb-btn-primary {
    background: var(--uees-primary);
    color: white;
}

.wpjb-btn-primary:hover {
    background: #002a5c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.3);
}

.wpjb-btn-success {
    background: var(--uees-success);
    color: white;
}

.wpjb-btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.wpjb-btn-danger {
    background: var(--uees-danger);
    color: white;
}

.wpjb-btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.wpjb-btn-secondary {
    background: #e1e8ed;
    color: #14171a;
}

.wpjb-btn-secondary:hover {
    background: #d1d8dd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wpjb-btn-light {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wpjb-btn-light:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Modal */
.wpjb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wpjb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.wpjb-modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 1000000;
    animation: slideUp 0.3s ease;
}

.wpjb-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0b227c;
    color: white;
    border-radius: 10px 10px 0 0;
}

.wpjb-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.wpjb-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.wpjb-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.wpjb-modal-body {
    padding: 20px;
    flex: 1;
    overflow: auto;
}

.wpjb-modal-footer {
    padding: 15px 30px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

/* Estado de No Resultados */
.wpjb-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wpjb-no-results div:first-child {
    font-size: 48px;
    margin-bottom: 15px;
}

.wpjb-no-results strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.wpjb-no-results a {
    color: var(--uees-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wpjb-no-results a:hover {
    text-decoration: underline;
    color: var(--uees-accent);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 61, 130, 0.1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 61, 130, 0.2);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wpjb-stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .wpjb-stat-card .stat-number {
        font-size: 20px;
    }
    
    .wpjb-stat-card .stat-label {
        font-size: 11px;
    }
    
    .wpjb-filters {
        grid-template-columns: 1fr;
    }
    
    .wpjb-application-card .app-header {
        flex-direction: column;
    }
    
    .wpjb-application-card .app-status {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .wpjb-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .wpjb-modal-header,
    .wpjb-modal-footer {
        padding: 15px 5px 20px 5px;
    }
    
    .wpjb-modal-header h3 {
        font-size: 16px;
    }
    
    .wpjb-btn,
    .wpjb-btn-small,
    .wpjb-view-cv-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
