/* Estilos para tarjetas tipo popup */
.popup-card {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.popup-card-content {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.4s ease-out;
    border: 2px solid var(--primary-yellow);
}

.popup-card-header {
    background: linear-gradient(135deg, var(--primary-black) 0%, #1a1a1a 100%);
    color: var(--primary-yellow);
    padding: 20px 25px;
    border-radius: 13px 13px 0 0;
    border-bottom: 2px solid var(--primary-yellow);
    position: relative;
}

.popup-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 193, 24, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

.popup-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.popup-card-title i {
    font-size: 1.5rem;
    color: var(--primary-yellow);
    text-shadow: 0 0 8px rgba(255, 193, 24, 0.5);
}

.popup-card-body {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.popup-card-subtitle {
    background: var(--primary-yellow);
    color: var(--primary-black);
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(255, 193, 24, 0.3);
}

.popup-card-subtitle i {
    font-size: 1rem;
}

/* Estilos mejorados para formularios */
.popup-form .form-label {
    font-weight: 600;
    color: var(--primary-black);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-form .form-label i {
    color: var(--primary-yellow);
    font-size: 0.95rem;
    width: 16px;
    text-align: center;
}

.popup-form .form-control,
.popup-form .form-select {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.popup-form .form-control:focus,
.popup-form .form-select:focus {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 24, 0.2);
    transform: translateY(-1px);
    background: #fffef7;
}

.popup-form .form-control:hover,
.popup-form .form-select:hover {
    border-color: #ffd700;
    box-shadow: 0 3px 10px rgba(255, 193, 24, 0.15);
}

/* Botones mejorados */
.popup-card-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px 25px;
    border-radius: 0 0 13px 13px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.popup-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.popup-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.popup-btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    color: white;
}

.popup-btn-primary {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, #ffd700 100%);
    color: var(--primary-black);
}

.popup-btn-primary:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: var(--primary-black);
}

/* Alertas mejoradas */
.popup-alert {
    border-radius: 8px;
    border: none;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.popup-alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.popup-alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 3px solid #28a745;
}

/* Scrollbar personalizada */
.popup-card-content::-webkit-scrollbar {
    width: 6px;
}

.popup-card-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.popup-card-content::-webkit-scrollbar-thumb {
    background: var(--primary-yellow);
    border-radius: 8px;
}

.popup-card-content::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .popup-card {
        padding: 10px;
    }
    
    .popup-card-content {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .popup-card-header {
        padding: 16px 20px;
        border-radius: 10px 10px 0 0;
    }
    
    .popup-card-title {
        font-size: 1.2rem;
    }
    
    .popup-card-body {
        padding: 18px;
    }
    
    .popup-card-actions {
        flex-direction: column;
        padding: 12px 18px;
    }
    
    .popup-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Efectos adicionales */
.popup-card-content::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--primary-yellow), #ffd700, var(--primary-yellow));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.2;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    from {
        opacity: 0.2;
    }
    to {
        opacity: 0.4;
    }
}

/* Mejoras para campos específicos */
.popup-form .form-control[type="date"],
.popup-form .form-control[type="time"] {
    position: relative;
}

.popup-form .form-control[type="date"]::-webkit-calendar-picker-indicator,
.popup-form .form-control[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(100%) saturate(1000%) hue-rotate(0deg) brightness(0.8);
    cursor: pointer;
}

.popup-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Estados de carga */
.popup-card.loading {
    pointer-events: none;
}

.popup-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary-yellow);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ajustes adicionales para texto más formal */
.popup-form .form-control::placeholder {
    font-size: 0.85rem;
    color: #6c757d;
}

.popup-form .form-select option {
    font-size: 0.9rem;
}

.popup-form .invalid-feedback {
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Espaciado más compacto */
.popup-form .row {
    margin-left: -8px;
    margin-right: -8px;
}

.popup-form .col-md-6,
.popup-form .col-12 {
    padding-left: 8px;
    padding-right: 8px;
}

.popup-form .mb-3 {
    margin-bottom: 1rem !important;
} 