/* =====================================================
   DROPDOWN DE EVENTOS/CALENDARIO - Estilos
   ===================================================== */

.events-dropdown-container {
    position: relative;
    display: inline-block;
}

.events-dropdown-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1em;
    width: 40px;
    height: 40px;
}

.events-dropdown-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.events-dropdown-button.has-unread {
    animation: pulse-events 2s infinite;
}

@keyframes pulse-events {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.events-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: bold;
    border: 2px solid white;
}

.events-dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 380px;
    max-width: 90vw;
    max-height: 600px;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.events-dropdown-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.events-dropdown-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.events-dropdown-header .close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.events-dropdown-header .close-button:hover {
    transform: scale(1.2);
}

.events-loading,
.events-empty {
    padding: 40px 20px;
    text-align: center;
    color: #888;
}

.events-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.events-loading i {
    font-size: 2em;
    color: #667eea;
}

.events-empty i {
    font-size: 3em;
    color: #ddd;
    margin-bottom: 15px;
}

.events-empty p {
    margin: 0;
    font-size: 1em;
}

.events-list {
    overflow-y: auto;
    max-height: 500px;
}

.event-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background-color: #f8f9fa;
}

.event-item:hover {
    background-color: #e9ecef;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item.event-read {
    background-color: white;
    opacity: 0.8;
}

.event-thumbnail {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unread-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background-color: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
}

.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.event-title {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.event-date {
    margin: 0;
    font-size: 0.85em;
    color: #667eea;
    font-weight: 600;
}

.event-description {
    margin: 0;
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 5px;
    transition: color 0.2s ease;
}

.event-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .events-dropdown-content {
        min-width: 320px;
        max-width: calc(100vw - 20px);
    }

    .event-thumbnail {
        width: 60px;
        height: 60px;
    }

    .events-dropdown-button {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }

    .event-item {
        padding: 12px 15px;
    }

    .event-title {
        font-size: 0.95em;
    }

    .event-date,
    .event-description,
    .event-link {
        font-size: 0.8em;
    }
}
