/* ============================================
   MODAL DE DETALLES DE FIESTA
   ============================================ */

.modal-fiesta {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none !important; /* Forzar que esté oculto por defecto */
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-fiesta.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal-fiesta-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header del modal con imagen de fondo */
.modal-fiesta-header {
    position: relative;
    height: 240px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay para mejorar legibilidad del texto */
.modal-fiesta-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.3) 0%, 
        transparent 40%, 
        transparent 60%, 
        rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.modal-fiesta-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-fiesta-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Badge eliminado - ya no se usa */

.modal-fiesta-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 2;
}

.modal-fiesta-title h2 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-fiesta-organizer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.modal-fiesta-organizer img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.modal-fiesta-organizer span {
    font-weight: 500;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.modal-fiesta-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.modal-fiesta-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Body del modal */
.modal-fiesta-body {
    padding: 30px;
}

.modal-fiesta-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.modal-fiesta-info-item {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.modal-fiesta-info-item h4 {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-fiesta-info-item p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.modal-fiesta-description {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.modal-fiesta-description h4 {
    margin: 0 0 15px 0;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-fiesta-description p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Lista de participantes */
.modal-fiesta-participants {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.modal-fiesta-participants-header {
    background: var(--accent);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-fiesta-participants-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.modal-fiesta-participants-list {
    max-height: 300px;
    overflow-y: auto;
}

.modal-fiesta-participant {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.modal-fiesta-participant:hover {
    background: rgba(233, 30, 99, 0.05);
}

.modal-fiesta-participant:last-child {
    border-bottom: none;
}

.modal-fiesta-participant-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.modal-fiesta-participant-info {
    flex: 1;
}

.modal-fiesta-participant-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modal-fiesta-participant-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.modal-fiesta-participant-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.modal-fiesta-participant-status.confirmado {
    color: #10b981;
}

.modal-fiesta-participant-status.pendiente {
    color: #f59e0b;
}

.modal-fiesta-participant-status.solicitud {
    color: #8b5cf6;
}

.modal-fiesta-participant-status.invitado {
    color: #f59e0b;
}

.modal-fiesta-participant-status.rechazado {
    color: #ef4444;
}

/* Participante confirmado destacado */
.modal-fiesta-participant.confirmado-destacado {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    border-left: 4px solid #10b981;
}

.modal-fiesta-participant.confirmado-destacado:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(233, 30, 99, 0.05) 100%);
}

/* Secciones de participantes */
.modal-fiesta-participants-section {
    border-bottom: 1px solid var(--border);
}

.modal-fiesta-participants-section:last-child {
    border-bottom: none;
}

.modal-fiesta-participant-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Estado vacío */
.modal-fiesta-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.modal-fiesta-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Botones de acción */
.modal-fiesta-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-fiesta-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-fiesta-btn-primary {
    background: var(--accent);
    color: white;
}

.modal-fiesta-btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.modal-fiesta-btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.modal-fiesta-btn-secondary:hover {
    background: var(--border);
}

.modal-fiesta-btn-organizer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-fiesta-btn-organizer:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-fiesta-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-fiesta-header {
        height: 150px;
    }
    
    .modal-fiesta-title h2 {
        font-size: 1.4rem;
    }
    
    .modal-fiesta-body {
        padding: 20px;
    }
    
    .modal-fiesta-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-fiesta-actions {
        flex-direction: column;
    }
    
    .modal-fiesta-participant {
        padding: 12px 15px;
    }
    
    .modal-fiesta-participant-avatar {
        width: 40px;
        height: 40px;
    }
}