.magenest-widget-title {
    margin: 0 0 12px;
}

/* Form filter */
.magenest-event-filter {
    padding: 8px;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -o-border-radius: 12px;
    background-color: #fff;
    margin: 0 0 24px;
}

.magenest-filter-inner,
.magenest-filter-inner .search-box {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.magenest-form_filter .filter-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.magenest-form_filter .search-box {
    min-width: 240px;
}

.magenest-form_filter input[type=date],
.magenest-form_filter input[type=search],
.magenest-form_filter input[type=text],
.magenest-form_filter input[type=url],
.magenest-form_filter select {
    border: 1px solid #D1D1D1;
    border-radius: 9999px;
    -webkit-border-radius: 9999px;
    -moz-border-radius: 9999px;
    -o-border-radius: 9999px;
    padding: 7px 16px;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.1px;
    color: #262626;
}

.magenest-form_filter .filter-separator {
    color: #4F4F4F;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.15px;
}

.magenest-form_filter .search-btn,
.magenest-form_filter .search-btn:hover {
    border: 0;
    padding: 0;
    min-width: 45px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    background-color: transparent;
}

.date-picker {
    background-image: url('../../img/select-calendar.svg');
    background-repeat: no-repeat;
    background-position: right 12px top 6px;
    background-size: 24px;
}

.magenest_archive-header .magenest-filter-inner .magenest-dropdown,
.magenest_archive-header .magenest-filter-inner .magenest-dropdown > button,
.magenest_archive-header .magenest-filter-inner .magenest-dropdown .dropdown-menu {
    width: 100%;
    text-align: left;
}

.magenest_archive-header .magenest-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

.magenest_archive-header .magenest-dropdown .option span {
    white-space: normal;
}

    /* Loop */
.magenest-event-list:not(.nothing-post) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.magenest_post-item {
    border: 1px solid #F6F6F6;
    padding: 8px 8px 12px;
    transition: 0.3s ease;
    -webkit-transition: 0.3s ease;
    -moz-transition: 0.3s ease;
    -o-transition: 0.3s ease;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -o-border-radius: 12px;
    background-color: #fff;
}

.magenest_post-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    -webkit-box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    -moz-box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    -o-box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.magenest_post-item a {
    display: block;
}

.magenest_post-image img {
    width: 100%;
    object-fit: cover;
    overflow: hidden;
    aspect-ratio: 3 / 1.89;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 4px !important;
    -webkit-border-radius: 4px !important;
    -moz-border-radius: 4px !important;
    -o-border-radius: 4px !important;
}

.magenest_post-content {
    padding: 12px 0 0;
}

.magenest_post-title {
    min-height: 48px;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.1px;
    color: #262626;
    margin: 0 0 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-transition: 0.3s ease;
    -moz-transition: 0.3s ease;
    -o-transition: 0.3s ease;
}

.magenest_post-item:hover .magenest_post-title {
    color: #D33791;
}

.magenest_post-date,
.magenest_post-excerpt {
    color: #4F4F4F;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/*.magenest-posts-list .magenest_post-date,*/
/*.magenest-posts-list .magenest_post-excerpt {*/
/*    -webkit-line-clamp: 3;*/
/*}*/

.magenest_post-date {
    margin: 0 0 8px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}

.magenest_post-date img {
    position: relative;
    margin-right: 4px;
    flex: 0 0 auto;
    bottom: 2px;
}

/* Keep the time line on a single line; ellipsis long recurrence text so it
   never wraps and breaks the card layout. */
.magenest_post-date-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.magenest-active-filters {
    justify-content: space-between;
    align-items: center;
    display: flex;
    border-top: 1px solid #E7E7E7;
    padding: 8px 0 0;
    margin: 8px 0 0;
}

.magenest-clear-filter,
.magenest-clear-filter:hover,
.magenest-filter-tags .remove-tag,
.magenest-filter-tags .remove-tag:hover {
    border: 0;
    padding: 0;
    margin: 0;
    background-color: transparent;
    outline: none;
}

.magenest-filter-tags .filter-tag:hover {
    color: #D33791;
}

.magenest-filter-tags .remove-tag img {
    position: relative;
    top: 3px;
}

.magenest-clear-filter,
.magenest-clear-filter:hover {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.1px;
    text-align: center;
    color: #D33791;
}

.magenest-clear-filter img {
    position: relative;
    top: 6px;
}

@media (max-width: 1024px) {
    .magenest-event-list:not(.nothing-post) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .magenest-filter-inner {
        flex-direction: column;
        gap: 8px;
    }

    .magenest-filter-inner .filter-item {
        width: 100%;
    }

    .date-picker {
        background-position: right 12px top 5px;
    }

    /*.magenest_post-image img {*/
    /*    max-height: 200px;*/
    /*    min-height: 200px;*/
    /*}*/
}

@media (max-width: 576px) {
    .magenest-event-list:not(.nothing-post) {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .magenest-filter-inner,
    .magenest-filter-inner .search-box {
        flex-direction: column;
        justify-content: flex-start;
    }

    .magenest-filter-inner .filter-item {
        width: 100%;
    }

    .magenest-event-filter .search-btn,
    .magenest-event-filter .search-btn:hover {
        right: 5px;
    }
}
/* ===== Event listing badges (status + recurrence type / holiday) ===== */
.magenest_event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -o-border-radius: 4px;
    border-radius: 4px;
    white-space: nowrap;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.15px;
}

.event-badge__icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    /*position: relative;*/
    /*bottom: 2px;*/
}

.event-badge span {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.15px;
    position: relative;
    top: 1px;
}

/* Built-in mono icons (status + recurring calendar) rendered white. Holiday
   icons are admin-uploaded and keep their original colors. */
.event-badge--status .event-badge__icon,
.event-badge--recurring .event-badge__icon {
    filter: brightness(0) invert(1);
}

.event-badge--status.event-badge--ongoing {
    background-color: #FF4D4F;
}

.event-badge--status.event-badge--upcoming {
    background-color: #E29D15;
}

.event-badge--status.event-badge--ended {
    background-color: #F5F5F5;
    color: rgba(191, 191, 191, 1);
    border: 1px solid #D9D9D9;
}

.event-badge--type.event-badge--recurring {
    background-color: #4096FF;
}

.event-badge--type.event-badge--holiday {
    position: relative;
    overflow: visible;
    background-color: #FF4D4F;
}

/* Holiday icon: decorative sticker popping out of the badge top-right corner. */
.event-badge__holiday-icon {
    position: absolute;
    top: -26.81px;
    right: -14px;
    width: 36px;
    height: 36px;
    object-fit: contain;
    pointer-events: none;
}
