/* =========================================================
   EVENT LIBRARY
========================================================= */

.event-library {
    width: 100%;
    margin-bottom: 35px;
}


/* =========================================================
   SEARCH
========================================================= */

.event-library-search {
    display: flex;
    gap: 12px;
    width: 100%;
}


.event-library-search-field {
    position: relative;
    flex: 1;
}


.event-library-search-field input {
    width: 100%;
    height: 58px;

    padding: 0 52px 0 50px;

    border: 2px solid #146ef5;
    border-radius: 14px;

    background: #fff;

    color: #171717;

    font-size: 18px;

    outline: none;

    box-sizing: border-box;
}


.event-library-search-field input:focus {
    box-shadow:
        0 0 0 4px rgba(20, 110, 245, .08);
}


.event-library-search-icon {
    position: absolute;

    left: 17px;
    top: 50%;

    transform: translateY(-50%);

    color: #146ef5;

    pointer-events: none;
}


.event-library-clear {
    position: absolute;

    right: 16px;
    top: 50%;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #171717;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}


.event-library-search-button {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    min-width: 145px;
    height: 58px;

    padding: 0 24px;

    border: 0;
    border-radius: 14px;

    background: #146ef5;
    color: #fff;

    font-size: 17px;
    font-weight: 600;

    cursor: pointer;

    transition: background .2s ease;
}


.event-library-search-button:hover {
    background: #0d5bd0;
}


/* =========================================================
   WHEN
========================================================= */

.event-library-when {
    margin-top: 25px;
}


.event-library-filter-title {
    margin-bottom: 12px;

    color: #56617a;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: .03em;
}


.event-library-date-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}


.event-date-button {
    height: 46px;

    padding: 0 23px;

    border: 1px solid #dce1e8;
    border-radius: 24px;

    background: #fff;

    color: #161616;

    font-size: 15px;
    font-weight: 500;

    cursor: pointer;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, .05);

    transition: .2s ease;
}


.event-date-button:hover {
    border-color: #146ef5;
}


.event-date-button.is-active {
    border-color: #146ef5;

    background: #146ef5;

    color: #fff;

    box-shadow:
        0 5px 12px rgba(20, 110, 245, .22);
}


/* =========================================================
   CUSTOM DATE
========================================================= */

.event-library-custom-date {
    display: flex;

    gap: 15px;

    margin-top: 15px;
}


.event-library-custom-date > div {
    display: flex;
    flex-direction: column;

    gap: 6px;
}


.event-library-custom-date label {
    color: #56617a;

    font-size: 13px;
    font-weight: 600;
}


.event-library-custom-date input {
    width: 190px;
    height: 44px;

    padding: 0 12px;

    border: 1px solid #dce1e8;
    border-radius: 9px;

    outline: none;
}


.event-library-custom-date input:focus {
    border-color: #146ef5;
}


/* =========================================================
   FILTERS
========================================================= */

.event-library-filters {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

    margin-top: 20px;
}


.event-library-filter {
    display: flex;
    flex-direction: column;

    gap: 7px;
}


.event-library-filter label {
    color: #56617a;

    font-size: 13px;
    font-weight: 600;
}


.event-library-filter select {
    width: 100%;
    height: 48px;

    padding: 0 14px;

    border: 1px solid #dce1e8;
    border-radius: 10px;

    background: #fff;

    color: #161616;

    font-size: 14px;

    outline: none;

    cursor: pointer;
}


.event-library-filter select:focus {
    border-color: #146ef5;

    box-shadow:
        0 0 0 3px rgba(20, 110, 245, .08);
}


/* =========================================================
   RESULTS
========================================================= */

#theme-event-library-results {
    position: relative;

    min-height: 100px;
}


.event-library-results-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin: 28px 0 18px;
}


.event-library-count {
    color: #56617a;

    font-size: 15px;
}


.event-library-count strong {
    color: #171717;
}


/* =========================================================
   VIEW SWITCHER
========================================================= */

.event-library-view-switcher {
    display: flex;

    overflow: hidden;

    border: 1px solid #dce1e8;
    border-radius: 10px;

    background: #fff;
}


.event-view-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 46px;
    height: 42px;

    border: 0;

    background: #fff;

    color: #7a8495;

    cursor: pointer;
}


.event-view-button + .event-view-button {
    border-left: 1px solid #e4e7ec;
}


.event-view-button.is-active {
    color: #146ef5;
}


/* =========================================================
   GRID
========================================================= */

.event-library-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}


.event-library-card {
    overflow: hidden;

    border: 1px solid #e0e4eb;
    border-radius: 15px;

    background: #fff;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, .06);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.event-library-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .10);
}


/* =========================================================
   IMAGE
========================================================= */

.event-library-card-image {
    display: block;

    width: 100%;
    height: 220px;

    overflow: hidden;

    background: #f2f5fb;
}


.event-library-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.event-library-placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: #aeb6c5;

    background:
        repeating-linear-gradient(
            135deg,
            #f4f6ff 0,
            #f4f6ff 8px,
            #edf1ff 8px,
            #edf1ff 16px
        );
}


/* =========================================================
   CONTENT
========================================================= */

.event-library-card-content {
    padding: 20px;
}


.event-library-card-title {
    margin: 0 0 15px;

    font-size: 20px;
    line-height: 1.3;
}


.event-library-card-title a {
    color: #101828;

    text-decoration: none;
}


.event-library-card-title a:hover {
    color: #146ef5;
}


.event-library-card-meta {
    display: flex;

    align-items: flex-start;

    gap: 8px;

    margin-top: 10px;

    color: #596579;

    font-size: 14px;
    line-height: 1.4;
}


.event-library-meta-icon {
    display: flex;

    flex: 0 0 auto;

    color: #657083;
}


/* =========================================================
   LIST VIEW
========================================================= */

.event-library-list-view .event-library-grid {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


.event-library-list-view .event-library-card {
    display: flex;

    min-height: 190px;
}


.event-library-list-view .event-library-card-image {
    width: 270px;
    height: auto;

    flex: 0 0 270px;
}


.event-library-list-view .event-library-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    flex: 1;
}


/* =========================================================
   PAGINATION
========================================================= */

.event-library-pagination {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 20px;

    margin-top: 30px;
}


.event-page-button {
    height: 42px;

    padding: 0 18px;

    border: 1px solid #dce1e8;
    border-radius: 9px;

    background: #fff;

    color: #171717;

    font-size: 14px;

    cursor: pointer;
}


.event-page-button:hover {
    border-color: #146ef5;

    color: #146ef5;
}


.event-page-number {
    color: #667085;

    font-size: 14px;
}


/* =========================================================
   EMPTY
========================================================= */

.event-library-empty {
    padding: 70px 20px;

    text-align: center;

    border: 1px solid #e0e4eb;
    border-radius: 15px;

    background: #fff;
}


.event-library-empty-icon {
    margin-bottom: 15px;

    color: #aab3c2;
}


.event-library-empty h3 {
    margin: 0 0 8px;

    color: #101828;

    font-size: 21px;
}


.event-library-empty p {
    margin: 0;

    color: #667085;

    font-size: 14px;
}


/* =========================================================
   LOADING
========================================================= */

#theme-event-library-results.is-loading {
    opacity: .45;

    pointer-events: none;
}


#theme-event-library-results.is-loading::after {
    content: "";

    position: absolute;

    top: 20px;
    right: 20px;

    width: 25px;
    height: 25px;

    border: 3px solid #dbe5f7;
    border-top-color: #146ef5;

    border-radius: 50%;

    animation:
        eventLibrarySpin .7s linear infinite;
}


@keyframes eventLibrarySpin {

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .event-library-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .event-library-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 767px) {

    .event-library-search {
        flex-direction: column;
    }


    .event-library-search-button {
        width: 100%;
    }


    .event-library-filters {
        grid-template-columns: 1fr;
    }


    .event-library-grid {
        grid-template-columns: 1fr;
    }


    .event-library-date-buttons {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .event-date-button {
        width: 100%;
    }


    .event-library-custom-date {
        flex-direction: column;
    }


    .event-library-custom-date input {
        width: 100%;
    }


    .event-library-list-view .event-library-card {
        flex-direction: column;
    }


    .event-library-list-view .event-library-card-image {
        width: 100%;
        height: 220px;
    }

}