/**
 * Events List Widget Styles
 */

.dd-events-list-widget {
    width: 100%;
}

/* Category Filters */
.dd-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.dd-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dd-filter-btn:hover {
    border-color: #2271b1;
    background: #f6f7f7;
}

.dd-filter-btn.active {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

/* Event Group */
.dd-event-group {
    margin-bottom: 30px;
}

.dd-group-header {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0 0 15px 0;
    padding: 0;
    color: #333;
}

.dd-events-group-content {
    display: flex;
    flex-direction: column;
}

/* Event Item */
.dd-event-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.dd-event-item:hover {
    background: #f9f9f9;
}

.dd-event-time {
    flex-shrink: 0;
    font-size: 14px;
    color: #666;
    min-width: 120px;
}

.dd-event-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dd-category-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dd-event-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.dd-category-name {
    font-size: 13px;
    color: #888;
}

/* Divider */
.dd-event-divider {
    border-top: 1px solid #e0e0e0;
    margin: 10px 0;
    width: 100%;
}

/* Empty Message */
.dd-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Modal */
.dd-event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dd-event-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dd-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
}

.dd-modal-close-btn:hover {
    color: #333;
}

.dd-modal-event-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-right: 30px;
}

.dd-modal-event-time {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dd-modal-event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.dd-modal-event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.dd-modal-event-categories {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.dd-modal-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 13px;
}

.dd-modal-category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dd-modal-event-links {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.dd-modal-event-links h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.dd-event-link-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2271b1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.dd-event-link-button:hover {
    background: #135e96;
    color: white;
}

.dd-event-link-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dd-modal-event-description {
    line-height: 1.6;
    color: #333;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.dd-modal-event-description p:first-child {
    margin-top: 0;
}

.dd-modal-event-description p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dd-event-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .dd-event-time {
        min-width: auto;
    }
    
    .dd-category-filters {
        justify-content: center;
    }
    
    .dd-event-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .dd-modal-event-title {
        font-size: 20px;
    }
    
    .dd-event-link-button {
        display: flex;
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
}

/* Hidden elements based on widget settings */
.dd-category-dot-hidden .dd-category-dot,
.dd-category-dot-hidden .dd-modal-category-dot {
    display: none;
}

.dd-category-name-hidden .dd-category-name,
.dd-category-name-hidden .dd-modal-category-badge {
    display: none;
}
