/**
 * Next Events Styles
 *
 * @package Astra Child
 * @since 1.0.0
 */

/* ==========================================================================
   Next Events Section
   ========================================================================== */

.next-events-section {
    background: var(--box-bg, #fff);
    padding: var(--section-gap, 30px) 0;
    margin: var(--section-gap, 30px) 0;
    border-radius: var(--box-border-radius, 8px);
    box-shadow: var(--box-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
    border: var(--box-border, 1px solid rgba(0, 0, 0, 0.06));
}

.next-events-container {
    max-width: var(--container-max-width, 1200px);
    margin: 0 auto;
    padding: 0 var(--container-padding, 20px);
}

/* ==========================================================================
   Header
   ========================================================================== */

.next-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--component-gap-sm, 15px);
    margin-bottom: var(--component-gap, 20px);
}

.next-events-header-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.next-events-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2a4a;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.next-events-filters {
    display: flex;
    gap: 8px;
}

.next-events-filter {
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.next-events-filter:hover {
    background: #e5e7eb;
    color: #1a2a4a;
}

.next-events-filter.active {
    background: var(--ast-global-color-0, #1a2a4a);
    color: #fff;
}

/* ==========================================================================
   Show All Link
   ========================================================================== */

.next-events-show-all {
    font-size: 0.9rem;
    color: var(--ast-global-color-0, #1a2a4a);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.next-events-show-all:hover {
    text-decoration: underline;
}

.next-events-show-all::after {
    content: '→';
}

/* ==========================================================================
   Events List
   ========================================================================== */

.next-events-list {
    display: flex;
    flex-direction: column;
}

.next-events-item {
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.next-events-item:first-child {
    border-top: 1px solid #e5e7eb;
}

.next-events-item:hover {
    background-color: #f9fafb;
}

.next-events-item.hidden-event {
    display: none;
}

.next-events-item-time {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.next-events-item-title {
    font-size: 0.95rem;
    color: #1a2a4a;
    font-weight: 500;
}

.next-events-item-location {
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: right;
}

/* Event type indicators */
.event-type-match .next-events-item-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--ast-global-color-0, #1a2a4a);
    border-radius: 50%;
    margin-right: 8px;
}

.event-type-event .next-events-item-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--ast-global-color-0, #1a2a4a);
    border-radius: 50%;
    margin-right: 8px;
}

/* ==========================================================================
   Tags / Links
   ========================================================================== */

.next-events-tags {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.next-events-tags a {
    font-size: 0.85rem;
    color: var(--ast-global-color-0, #1a2a4a);
    text-decoration: none;
    font-weight: 500;
}

.next-events-tags a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Loader & Load More
   ========================================================================== */

.next-events-loader {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-size: 0.9rem;
}

/* No Items Message */
.next-events-no-items {
    text-align: center;
    padding: var(--section-gap, 30px) var(--component-gap, 20px);
    color: #6b7280;
    background: #f9fafb;
    border-radius: var(--card-border-radius, 6px);
    border: 1px dashed #e5e7eb;
}

.next-events-no-items p {
    margin: 0;
    font-size: 1rem;
}

.next-events-load-more {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 20px auto 0;
    padding: 12px 25px;
    background: var(--ast-global-color-0, #1a2a4a);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.next-events-load-more:hover {
    opacity: 0.85;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 992px) {
    .next-events-item {
        grid-template-columns: 130px 1fr 150px;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .next-events-section {
        padding: var(--section-gap-sm, 20px) 0;
        margin-top: var(--section-gap-sm, 20px);
    }

    .next-events-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .next-events-header-left {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .next-events-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .next-events-item {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 12px 0;
    }

    .next-events-item-location {
        text-align: left;
    }

    .next-events-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .next-events-container {
        padding: 0 15px;
    }

    .next-events-filter {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .next-events-item-time {
        font-size: 0.85rem;
    }

    .next-events-item-title {
        font-size: 0.9rem;
    }
}
