/**
 * Blues Events Elementor Styles
 * Styles for Elementor widgets
 */

/* ===== General Widget Styles ===== */
.blues-events-widget {
    position: relative;
    width: 100%;
}

.widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.widget-loading:after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.widget-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
}

.no-events {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* ===== Event Cards ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 20px 0;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.events-card {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.events-minimal {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.event-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.event-card.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.event-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
}

.event-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-thumbnail img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-cancelled {
    background: #dc3545;
}

.status-badge.status-postponed {
    background: #ffc107;
}

.status-badge.status-sold_out {
    background: #28a745;
}

.event-card-content {
    padding: 20px;
}

.event-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.event-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
}

.event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: #0073aa;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-meta i {
    color: #0073aa;
}

.event-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.event-price {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 15px;
}

.event-cta {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.event-cta:hover {
    background: #005177;
    color: #fff;
}

/* ===== Calendar Widget ===== */
.blues-events-calendar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.calendar-nav button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.calendar-nav button:hover {
    background: #005177;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-name {
    text-align: center;
    padding: 10px;
    font-weight: 600;
    background: #f5f5f5;
    border-radius: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day.empty {
    background: #f9f9f9;
    cursor: default;
}

.calendar-day.has-events {
    background: #e3f2fd;
    border-color: #0073aa;
}

.calendar-day.has-events:hover {
    background: #bbdefb;
    transform: scale(1.05);
}

.calendar-day.today {
    background: #fff3cd;
    border-color: #ffc107;
    font-weight: bold;
}

.day-number {
    font-size: 16px;
}

.event-indicator {
    font-size: 11px;
    background: #0073aa;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 2px;
}

/* ===== Featured Events Widget ===== */
.blues-featured-events-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    color: #fff;
}

.blues-featured-events-widget .event-card {
    background: rgba(255,255,255,0.95);
}

/* ===== Search Widget ===== */
.blues-search-widget {
    position: relative;
}

.blues-search-container {
    position: relative;
}

.blues-search-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.blues-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.blues-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.result-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

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

.result-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.result-meta {
    font-size: 13px;
    color: #666;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .events-card {
        grid-template-columns: 1fr;
    }
    
    .calendar-day-name {
        font-size: 12px;
        padding: 5px;
    }
    
    .calendar-day {
        font-size: 14px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: fadeIn 0.5s ease-in-out;
}

/* ===== Pagination ===== */
.widget-pagination {
    text-align: center;
    margin-top: 30px;
}

.load-more-events {
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.load-more-events:hover {
    background: #005177;
}

.load-more-events.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

