/* =========================================================
   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: 5px;
}


.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: 40px;
    height: 35px;
	padding:12px;
    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;
}

.event-library-selected-filters button {
  padding: 3px 10px;
  font-size: 13px !important;
  border-radius: 200px;
  background: #101130;
  color: #fff;
  display: flex;
  gap: 8px;
}
.event-library-selected-filters button.event-library-clear-all{ background:#11246f;}
/* =========================================================
   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;
    }

}





/* =========================================================
   FILTER TOOLBAR
========================================================= */

.event-library-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    margin-bottom: 12px;
}

.event-library-filter-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.event-library-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 48px;
    padding: 0 17px;
    border: 1px solid #146ef5;
    border-radius: 10px;
    background: #146ef5;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.event-library-filter-toggle:hover {
    background: #0d5bd0;
}

.event-library-filter-chevron {
    transition: transform .2s ease;
}

.event-library-filter-toggle[aria-expanded="true"]
.event-library-filter-chevron {
    transform: rotate(180deg);
}


/* =========================================================
   ACTIVE FILTER CHIPS
========================================================= */

.event-library-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.event-library-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 12px;
    border-radius: 20px;
    background: #eef5ff;
    color: #145fc9;
    font-size: 14px;
    font-weight: 500;
}

.event-library-active-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
}

.event-library-clear-all {
    padding: 0;
    border: 0;
    background: transparent;
    color: #146ef5;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}


/* =========================================================
   SORT
========================================================= */

.event-library-filter-right {
    display: flex;
    align-items: center;
}

.event-library-sort-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-library-sort-inline label {
    color: #667085;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.event-library-sort-inline select {
    min-width: 210px;
    height: 44px;
    padding: 0 36px 0 13px;
    border: 1px solid #dce1e8;
    border-radius: 9px;
    background: #fff;
    color: #171717;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.event-library-sort-inline select:focus {
    border-color: #146ef5;
    box-shadow: 0 0 0 3px rgba(20, 110, 245, .08);
}


/* =========================================================
   FILTER PANEL
========================================================= */

.event-library-filter-panel {
    margin-top: 12px;
    border: 1px solid #e2e7ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(16, 24, 40, .07);
    overflow: hidden;
}

.event-library-filter-panel[hidden] {
    display: none;
}

.event-library-filter-panel-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    padding: 28px 30px;
}


/* =========================================================
   FILTER SECTIONS
========================================================= */

.event-library-filter-section {
    min-width: 0;
}

.event-library-filter-when {
    padding-right: 30px;
    border-right: 1px solid #e8ebf0;
}

.event-library-filter-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: #101828;
    font-size: 16px;
    font-weight: 700;
}

.event-library-filter-heading svg {
    color: #146ef5;
}


/* =========================================================
   DATE BUTTONS
========================================================= */

.event-library-date-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.event-date-button {
    height: 42px;
    padding: 0 17px;
    border: 1px solid #dce1e8;
    border-radius: 22px;
    background: #fff;
    color: #344054;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: .2s ease;
}

.event-date-button:hover {
    border-color: #146ef5;
    color: #146ef5;
}

.event-date-button.is-active {
    border-color: #146ef5;
    background: #146ef5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(20, 110, 245, .20);
}


/* =========================================================
   CUSTOM DATE
========================================================= */

.event-library-custom-date {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.event-library-custom-date > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
}

.event-library-custom-date label {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.event-library-custom-date input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #dce1e8;
    border-radius: 9px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

.event-library-custom-date input:focus {
    border-color: #146ef5;
    box-shadow: 0 0 0 3px rgba(20, 110, 245, .08);
}


/* =========================================================
   SELECT FILTERS
========================================================= */

.event-library-filter {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.event-library-filter:last-child {
    margin-bottom: 0;
}

.event-library-filter label {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.event-library-filter select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #dce1e8;
    border-radius: 9px;
    background: #fff;
    color: #171717;
    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);
}


/* =========================================================
   FILTER FOOTER
========================================================= */

.event-library-filter-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    padding: 16px 30px;
    border-top: 1px solid #e8ebf0;
    background: #fafbfc;
}
  
/* =========================================================
   FINAL LAYOUT
   Left sidebar + right results
========================================================= */

.event-library-layout {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
    gap: 32px;
    width: 100%;
    align-items: start;
}

.event-library-sidebar {
    position: sticky;
    top: 30px;
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(16, 24, 40, .06);
    box-sizing: border-box;
}

.event-library-sidebar-title,
.event-library-sidebar-heading {
    color: #101828;
    font-size: 17px;
    font-weight: 700;
}

.event-library-sidebar-title {
    margin-bottom: 12px;
}

.event-library-sidebar-heading {
    margin-bottom: 20px;
}

.event-library-sidebar-filters {
    margin-top: 28px;
}

.event-library-sidebar-section {
    margin-bottom: 26px;
}

.event-library-sidebar-section .event-library-filter-title {
    margin-bottom: 12px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.event-library-search {
    display: block;
}

.event-library-sidebar .event-library-search-field {
    width: 100%;
}

.event-library-sidebar .event-library-search-field input {
    height: 48px;
    padding: 0 42px 0 42px;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: none;
}

.event-library-sidebar .event-library-search-field input:focus {
    border-color: #146ef5;
    box-shadow: 0 0 0 3px rgba(20, 110, 245, .08);
}

.event-library-sidebar .event-library-search-icon {
    left: 13px;
    width: 19px;
    height: 19px;
    color: #667085;
}

.event-library-sidebar .event-library-clear {
    right: 10px;
    width: 26px;
    height: 26px;
    font-size: 22px;
    color: #667085;
}

.event-library-sidebar .event-library-search-button {
    width: 100%;
    min-width: 0;
    height: 46px;
    margin-top: 10px;
    border-radius: 10px;
    font-size: 14px;
}

.event-library-date-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-library-sidebar .event-date-button {
    display: flex;
    align-items: center;
    width: 100%;
    height: 40px;
	min-height:inherit;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #edeff0;
    color: #222830;
    box-shadow: none;
    font-size: 14px !important;
    text-align: left;
}

.event-library-sidebar .event-date-button:hover {
    background: #f5f8fd;
    color: #146ef5;
}

.event-library-sidebar .event-date-button.is-active {
    background: #eef5ff;
    color: #145fc9;
    box-shadow: none;
    font-weight: 600;
}

.event-date-radio {
    position: relative;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 1.5px solid #98a2b3;
    border-radius: 50%;
    box-sizing: border-box;
    flex: 0 0 16px;
}

.event-library-sidebar .event-date-button.is-active .event-date-radio {
    border-color: #146ef5;
}

.event-library-sidebar .event-date-button.is-active .event-date-radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #146ef5;
}

.event-library-sidebar .event-library-custom-date {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.event-library-sidebar .event-library-custom-date input {
    height: 42px;
    font-size: 13px;
}

.event-library-sidebar .event-library-filter {
    margin-bottom: 18px;
}

.event-library-sidebar .event-library-filter label {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}

.event-library-sidebar .event-library-filter select {
    height: 38px;
    border-radius: 6px;
    font-size: 13px;
}

.event-library-sidebar-footer {
    padding-top: 20px;
    margin-top: 4px;
    border-top: 1px solid #eaecf0;
}

.event-library-reset {
    width: 100%;
    height: 42px;
    padding: 0 15px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #fff;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.event-library-reset:hover {
    border-color: #146ef5;
    color: #146ef5;
    background: #f8fbff;
}

.event-library-content {
    min-width: 0;
}

.event-library-content #theme-event-library-results {
    min-height: 100px;
}

.event-library-content .event-library-results-header {
    margin: 0 0 14px;
}

.event-library-selected-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

/* This container is injected into the results header area by JS/PHP. */
.event-library-results .event-library-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.event-library-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 8px 0 12px;
    border: 1px solid #d6e5fb;
    border-radius: 18px;
    background: #f3f7fd;
    color: #145fc9;
    font-size: 13px;
    font-weight: 500;
}

.event-library-active-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #145fc9;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}

.event-library-active-filter button:hover {
    background: #dcecff;
}

.event-library-clear-all {
    padding: 0;
    border: 0;
    background: transparent;
    color: #146ef5;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.event-library-clear-all:hover {
    text-decoration: underline;
}

/* Hide the old top filter UI because filters now live in the sidebar. */
.event-library-filter-toolbar,
.event-library-filter-panel {
    display: none !important;
}

/* Selected filters are moved into the results area by the JS. */
.event-library-results .event-library-selected-filter-row {
    display: flex;
}

/* Results header now keeps count on the left and controls on the right. */
.event-library-results-header {
    min-height: 42px;
}

/* =========================================================
   WHEN FILTER - BUTTON STYLE
   ========================================================= */

.event-library-date-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}


/*
 * Hide the radio circle completely
 */
.event-date-radio {
    display: none !important;
}


/*
 * Date option button
 */
.event-date-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;

    padding: 10px 12px;

    border: 1px solid #e1e7ef;
    border-radius: 10px;

    background: #fff;

    color: #24364b;

    font-size: 15px;
    font-weight: 500;

    line-height: 1.35;

    text-align: center;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}


/*
 * Hover
 */
.event-date-button:hover {
    background: #f5f8fc;
    border-color: #cbd7e6;
}


/*
 * Selected button
 */
.event-date-button.is-active {
    background: #eaf2ff;

    border-color: #eaf2ff;

    color: #1769e0;

    font-weight: 600;

    box-shadow: none;
}


/*
 * Custom range takes full row
 */
.event-date-button[data-date-preset="custom"] {
    grid-column: 1 / -1;
}


/*
 * Remove browser button appearance
 */
.event-date-button,
.event-date-button:hover,
.event-date-button:focus,
.event-date-button:active {
    appearance: none;
    -webkit-appearance: none;

    outline: none;
}


/*
 * Keyboard focus
 */
.event-date-button:focus-visible {
    border-color: #1769e0;

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, 0.12);
}


/* =========================================================
   CUSTOM DATE RANGE
   ========================================================= */

.event-library-custom-date {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-top: 14px;
}

.event-library-custom-date[hidden] {
    display: none !important;
}

.event-library-custom-date label {
    display: block;

    margin-bottom: 7px;

    color: #50627a;

    font-size: 14px;
    font-weight: 600;
}

.event-library-custom-date input[type="date"] {
    width: 100%;
    height: 48px;

    padding: 0 12px;

    border: 1px solid #d6dee9;
    border-radius: 10px;

    background: #fff;

    color: #172b4d;

    font-size: 14px;

    box-sizing: border-box;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .event-library-date-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .event-date-button {
        min-height: 46px;

        padding: 9px 8px;

        font-size: 14px;
    }

    .event-library-custom-date {
        grid-template-columns: 1fr;
    }

}
/* =========================================================
   SEARCH FIELD
   ========================================================= */

.event-library-search-field {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
}


/* Input */

.event-library-search-field input[type="search"] {
    width: 100%;

    height: 40px;

    padding: 0 40px 0 15px;

    border: 1px solid #d5dce7;
    border-radius: 8px;

    background: #fff;

    color: #172b4d;

    font-size: 14px;

    outline: none;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Placeholder */

.event-library-search-field
input[type="search"]::placeholder {
    color: #7d8795;
}


/* Focus */

.event-library-search-field
input[type="search"]:focus {
    border-color: #2676ed;

    box-shadow:
        0 0 0 3px rgba(38, 118, 237, 0.10);
}


/* Left search icon */

.event-library-search-icon {
    position: absolute;

    left: 17px;

    top: 50%;

    transform: translateY(-50%);

    color: #63738a;

    pointer-events: none;

    z-index: 2;
}


/* Clear button */

.event-library-clear {
    position: absolute;

    right: 43px;

    top: 50%;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: #63738a;

    font-size: 19px;
    line-height: 1;

    cursor: pointer;

    z-index: 3;
}

.event-library-clear:hover {
    color: #172b4d;
}


/* Search icon button */

.event-library-search-submit {
    position: absolute;
	background:none;
    right: 8px;

    top: 50%;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 8px; 

    color: #000;

    cursor: pointer;

    z-index: 3;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}


.event-library-search-submit:hover {
    background: none; color:#ff6c3a;
}


.event-library-search-submit:active {
    transform: translateY(-50%) scale(0.96);
}


.event-library-search-submit svg {
    display: block;
}
/* =========================================================
   SEARCH CLEAR BUTTON
   ========================================================= */

.event-library-clear {
    display: none;

    position: absolute;

    right: 48px;
    top: 50%;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: #6d7c90;

    font-size: 20px;
    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    z-index: 3;
}


.event-library-clear:hover {
    color: #172b4d;
}


/*
 * Show clear button when JS adds this class
 */
.event-library-search-field.has-value
.event-library-clear {
    display: flex;
}
/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .event-library-layout {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 24px;
    } 

    .event-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 767px) {

    .event-library-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .event-library-sidebar {
        position: static; 
    } 

    .event-library-grid {
        grid-template-columns: 1fr;
    }

    .event-library-results-header {
        align-items: flex-start;
        gap: 15px;
    }

    .event-library-results-header {
        flex-wrap: wrap;
    }

    .event-library-view-switcher {
        margin-left: auto;
    }

    .event-library-active-filters {
        margin-bottom: 15px;
    }

    .event-library-list-view .event-library-card {
        flex-direction: column;
    }

    .event-library-list-view .event-library-card-image {
        width: 100%;
        height: 220px;
    }

}


/* =========================================================
   CALENDAR VIEW
   ========================================================= */

.event-library-results-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
}


.event-calendar-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    background: #fff;
    color: #1b3760;
    font-size: 14px !important;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

.event-calendar-view-button:focus,
.event-calendar-view-button:hover,
.event-calendar-view-button.is-active {
    background: #edf4ff;
    border-color: #b9d2f8;
    color: #1769e0;
    box-shadow: 0 2px 7px rgba(23, 105, 224, .08);
}


.event-calendar-view-button svg {
    flex: 0 0 auto;
}


/* Hide normal calendar-mode content without removing it. */
.calendar-mode-hidden {
    display: none !important;
}


.event-calendar-loading {
    position: relative;
}


.event-calendar-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 200;
    background: rgba(255, 255, 255, .42);
    pointer-events: none;
}


/* =========================================================
   CALENDAR CONTAINER
   ========================================================= */

.event-library-calendar {
    width: 100%;
    margin-top: 18px;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}


.event-library-calendar[hidden] {
    display: none !important;
}


/* =========================================================
   CALENDAR HEADER
   ========================================================= */

.event-calendar-header {
    display: grid;
    grid-template-columns: 52px 70px minmax(0, 1fr) 70px;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid #dce3ec;
    background: #fff;
}


.event-calendar-range {
    text-align: center;
    color: #1b3760;
    font-size: 15px;
    font-weight: 600;
}


.event-calendar-nav,
.event-calendar-today {
    height: 34px;
    margin: 0 7px;
    border: 1px solid #dce3ec;
    border-radius: 7px;
    background: #fff;
    color: #1769e0;
    cursor: pointer;
}


.event-calendar-nav {
    font-size: 23px;
    line-height: 1;
}


.event-calendar-today {
    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   CALENDAR BODY
   ========================================================= */

.event-calendar-shell {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    height: 720px;
    overflow: auto;
    scrollbar-width: thin;
}


.event-calendar-time-column {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #fff;
    border-right: 1px solid #dce3ec;
}


.event-calendar-time-header {
    height: 58px;
    border-bottom: 1px solid #dce3ec;
}


.event-calendar-time-label {
    height: 60px;
    box-sizing: border-box;
    padding: 7px 8px;
    border-bottom: 1px solid #edf1f6;
    color: #52657e;
    font-size: 11px;
    text-align: right;
}


.event-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    min-width: 1015px;
}


.event-calendar-day {
    position: relative;
    border-right: 1px solid #dce3ec;
}


.event-calendar-day:last-child {
    border-right: 0;
}


.event-calendar-day-header {
    position: sticky;
    top: 0;
    z-index: 8;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    border-bottom: 1px solid #dce3ec;
    background: #fff;
}


.event-calendar-day-name {
    color: #60728b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}


.event-calendar-day-number {
    color: #162d4e;
    font-size: 17px;
}


.event-calendar-day.is-today
.event-calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1769e0;
    color: #fff;
}


/* =========================================================
   HOUR GRID
   ========================================================= */

.event-calendar-day-body {
    position: relative;
    height: 1440px;
}


.event-calendar-hour {
    height: 60px;
    box-sizing: border-box;
    border-bottom: 1px solid #edf1f6;
}


/* =========================================================
   CALENDAR EVENTS
   ========================================================= */

.event-calendar-event {
    position: absolute;
    left: 4px;
    right: 4px;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px;
    overflow: visible;
    box-sizing: border-box;
    border: 1px solid #d4ddf5;
    border-radius: 7px;
    background: #e9edff;
    color: #172b4d;
    text-decoration: none;
    transition:
        box-shadow .15s ease,
        transform .15s ease;
}


.event-calendar-event:hover {
    z-index: 100;
    box-shadow: 0 8px 24px rgba(20, 43, 77, .18);
    transform: translateY(-1px);
}


.event-calendar-event-image {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border-radius: 4px;
}


.event-calendar-event-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.event-calendar-event-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.event-calendar-event-content strong {
    display: -webkit-box;
    overflow: hidden;
    color: #172b4d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


.event-calendar-event-content small {
    color: #536680;
    font-size: 12px;
}


/* =========================================================
   HOVER DETAILS
   ========================================================= */

.event-calendar-hover-card {
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    z-index: 1000;
    display: none;
    width: 285px;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #d8dee8;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(20, 35, 60, .20);
}


.event-calendar-event:hover
.event-calendar-hover-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.event-calendar-event.calendar-hover-left
.event-calendar-hover-card {
    left: auto;
    right: calc(100% + 8px);
}


.event-calendar-hover-image {
    display: block;
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 3px;
}


.event-calendar-hover-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.event-calendar-hover-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.event-calendar-hover-content strong {
    color: #172b4d;
    font-size: 16px;
    line-height: 1.3;
}


.event-calendar-hover-content small {
    color: #1769e0;
    font-size: 12px;
    font-weight: 600;
}


.event-calendar-hover-content > span {
    color: #52657e;
    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .event-library-results-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .event-calendar-view-button {
        grid-column: 2;
        grid-row: 1;
    }

    .event-library-view-switcher {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .event-library-count {
        grid-row: 1 / span 2;
    }

}


@media (max-width: 767px) {

    .event-library-results-header {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .event-library-count {
        width: 100%;
    }

    .event-calendar-view-button span {
        display: none;
    }

    .event-calendar-view-button {
        width: 42px;
        padding: 0;
    }

    .event-library-view-switcher {
        margin-left: auto;
    }

    .event-calendar-shell {
        height: 600px;
    }

    .event-calendar-hover-card {
        width: 250px;
    }

}
/* =========================================================
   EVENT LIBRARY - LIST VIEW
   IMPORTANT:
   Put this AFTER all existing event library CSS.
   ========================================================= */


/* ---------------------------------------------------------
   LIST CONTAINER
   --------------------------------------------------------- */

.event-library-grid.is-list-view {
    display: flex !important;
    flex-direction: column !important;

    grid-template-columns: none !important;

    width: 100% !important;

    gap: 20px !important;
}


/* ---------------------------------------------------------
   LIST CARD
   --------------------------------------------------------- */

.event-library-grid.is-list-view
.event-library-card {
    display: grid !important;

    grid-template-columns: 280px minmax(0, 1fr) !important;

    width: 100% !important;

    min-width: 0 !important;
    min-height: 210px !important;

    margin: 0 !important;

    overflow: hidden;

    box-sizing: border-box;
}


/* ---------------------------------------------------------
   LIST IMAGE
   --------------------------------------------------------- */

.event-library-grid.is-list-view
.event-library-card-image {
    display: block !important;

    width: 280px !important;
    height: 210px !important;

    min-width: 280px !important;
    min-height: 210px !important;

    overflow: hidden;
}


/* Image */

.event-library-grid.is-list-view
.event-library-card-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
}


/* ---------------------------------------------------------
   LIST CARD CONTENT
   --------------------------------------------------------- */

.event-library-grid.is-list-view
.event-library-card-content {
    display: flex !important;

    flex-direction: column !important;
    justify-content: center !important;

    width: auto !important;

    min-width: 0 !important;

    padding: 28px 32px !important;

    box-sizing: border-box;
}


/* ---------------------------------------------------------
   LIST TITLE
   --------------------------------------------------------- */

.event-library-grid.is-list-view
.event-library-card-title {
    margin: 0 0 18px !important;

    font-size: 24px;
    line-height: 1.3;
}


/* ---------------------------------------------------------
   LIST META
   --------------------------------------------------------- */

.event-library-grid.is-list-view
.event-library-card-meta {
    display: flex;

    align-items: center;

    margin: 6px 0 0;
}


/* ---------------------------------------------------------
   LIST VIEW - PLACEHOLDER IMAGE
   --------------------------------------------------------- */

.event-library-grid.is-list-view
.event-library-placeholder {
    width: 100% !important;
    height: 100% !important;

    display: flex;

    align-items: center;
    justify-content: center;
}


/* ---------------------------------------------------------
   GRID VIEW
   Keep normal grid unchanged.
   --------------------------------------------------------- */

.event-library-grid:not(.is-list-view) {
    display: grid;
}

/* =========================================================
   LIST VIEW - DESCRIPTION
========================================================= */

.event-library-card-description {
    display: none;
    margin-top: 16px;
    max-width: 900px;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}


/*
 * Show description only in List view
 */
.event-library-grid.is-list-view .event-library-card-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


/*
 * List card content spacing
 */
.event-library-list-view
.event-library-card-content {
    padding: 24px 32px;
}


/*
 * Keep description from making
 * the list cards excessively tall.
 */
.event-library-list-view
.event-library-card {
    min-height: 210px;
}


/*
 * Mobile
 */
@media (max-width: 767px) {

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

    .event-library-list-view
    .event-library-card-description {
        font-size: 13px;
        line-height: 1.5;
    }

}
/* =========================================================
   RESPONSIVE LIST VIEW
   ========================================================= */

@media (max-width: 900px) {

    .event-library-grid.is-list-view
    .event-library-card {

        grid-template-columns:
            220px minmax(0, 1fr) !important;

    }


    .event-library-grid.is-list-view
    .event-library-card-image {

        width: 220px !important;
        min-width: 220px !important;

        height: 190px !important;
        min-height: 190px !important;

    }

}


@media (max-width: 767px) {

    .event-library-grid.is-list-view {
        display: flex !important;

        flex-direction: column !important;
    }


    .event-library-grid.is-list-view
    .event-library-card {

        display: flex !important;

        flex-direction: column !important;

        width: 100% !important;

    }


    .event-library-grid.is-list-view
    .event-library-card-image {

        width: 100% !important;
        min-width: 100% !important;

        height: 220px !important;
        min-height: 220px !important;

    }


    .event-library-grid.is-list-view
    .event-library-card-content {

        width: 100% !important;

        padding: 20px !important;

    }

}