﻿/* ==========================================
   MyWFPL Library Events
   ========================================== */

#eventsControl.library-events {
    position: relative;
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 0 0 30px;
    padding: 18px;
    box-sizing: border-box;
    color: #222;
    background: #f5f7fb;
    border: 1px solid #d3dbe8;
    border-radius: 8px;
}


    #eventsControl.library-events,
    #eventsControl.library-events * {
        box-sizing: border-box;
    }

        #eventsControl.library-events p {
            margin-top: 0;
        }

/* ==========================================
   Filters
   ========================================== */

#eventsControl #filters {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
    color: #111;
    background: transparent;
    border: 0;
}

#eventsControl .filter-field {
    min-width: 0;
}

    #eventsControl .filter-field label,
    #eventsControl .filter-label-placeholder {
        display: block;
        min-height: 21px;
        margin: 0 0 6px;
        color: #111;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.35;
    }

#eventsControl .filter-label-placeholder {
    visibility: hidden;
}

#eventsControl .filter-help {
    display: block;
    margin: -2px 0 8px;
    color: #333;
    font-size: 12px;
    line-height: 1.35;
}

#eventsControl .filter-search {
    width: 100%;
    margin-bottom: 14px;
}

#eventsControl .filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    align-items: end;
}

#eventsControl .input,
#eventsControl select {
    position: relative;
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0;
    color: #222;
    background: #fff;
    border: 1px solid #bac6d6;
    border-radius: 5px;
}

    #eventsControl .input:focus-within {
        border-color: #2459b8;
        box-shadow: 0 0 0 3px rgba(36, 89, 184, 0.18);
    }

#eventsControl #filters input {
    display: block;
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 8px 44px 8px 12px;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    background: transparent;
    border: 0;
    border-radius: 5px;
    box-shadow: none;
}

    #eventsControl #filters input:focus {
        outline: 0;
    }

#eventsControl #filters select {
    padding: 7px 34px 7px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
}

    #eventsControl #filters select:focus {
        outline: 3px solid rgba(36, 89, 184, 0.22);
        outline-offset: 1px;
        border-color: #2459b8;
    }

    #eventsControl #filters input:disabled,
    #eventsControl #filters select:disabled,
    #eventsControl #filters button:disabled {
        cursor: wait;
        opacity: 0.7;
    }

#eventsControl .search-icon,
#eventsControl .calendar-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    color: #000;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

#eventsControl .search-icon {
    font-size: 22px;
}

#eventsControl .calendar-icon {
    font-size: 19px;
}

#eventsControl .reset-button {
    display: block;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 9px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    background: #3f56ae;
    border: 1px solid #354b9e;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

    #eventsControl .reset-button:hover {
        background: #304995;
        border-color: #293f84;
    }

    #eventsControl .reset-button:focus-visible {
        outline: 3px solid #fdb515;
        outline-offset: 2px;
    }

/* ==========================================
   tcal Date Picker
   Keep tcal in its normal document location.
   ========================================== */

#eventsControl .date-input-wrap {
    position: relative;
}

/*
   Do not use position: fixed.
   Do not append #tcal to body.
   Do not calculate coordinates in JavaScript.
*/

#eventsControl #tcal,
#tcal {
    z-index: 1000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
}

    /*
   Preserve the dimensions and positioning generated by tcal.js.
   These rules only normalize inherited Sitefinity styles.
*/

    #tcal table {
        width: auto;
        margin: 0;
        border-collapse: separate;
        border-spacing: 1px;
    }

    #tcal th,
    #tcal td {
        width: auto;
        height: auto;
        padding: 2px 4px;
        font-size: 12px;
        line-height: normal;
    }

    #tcal select,
    #tcal button {
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 1px 3px;
        font-size: 11px;
        line-height: normal;
        box-shadow: none;
    }

/* ==========================================
   Results Message and Loader
   ========================================== */

#eventsControl .results-message {
    margin: 0 0 14px;
    color: #17446f;
    font-size: 18px;
    font-weight: 700;
}

#eventsControl .event-loader {
    padding: 20px;
    color: #17446f;
    text-align: center;
}

    #eventsControl .event-loader .fa {
        margin-right: 6px;
    }

/* ==========================================
   Event Results
   ========================================== */

#eventsControl #data-window {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

#eventsControl #data {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    color: #222;
    font-family: inherit;
    font-size: 14px;
}

#eventsControl .event-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    margin: 0 0 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid #d3dbe8;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(17, 42, 76, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    #eventsControl .event-card:last-of-type {
        margin-bottom: 0;
    }

    #eventsControl .event-card:hover {
        border-color: #aebbd0;
        box-shadow: 0 4px 10px rgba(17, 42, 76, 0.13);
        transform: translateY(-1px);
    }

#eventsControl .event-date-column {
    width: 64px;
    min-width: 64px;
}

#eventsControl .date-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    min-height: 59px;
    padding: 6px 4px;
    color: #fff;
    text-align: center;
    background: #245c9e;
    border-radius: 7px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
}

#eventsControl .date-day-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

#eventsControl .date-month {
    display: inline;
    margin-right: 2px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
}

#eventsControl .date-day {
    display: inline;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.1;
}

#eventsControl .date-info-multiple {
    min-height: 59px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

#eventsControl .date-range {
    display: block;
}

#eventsControl .event-content {
    min-width: 0;
}

#eventsControl .event-title {
    margin: 0 0 9px;
    padding: 0 0 7px;
    color: #2456ba;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    border-bottom: 1px solid #ccd5e2;
    text-transform: none;
}

    #eventsControl .event-title a {
        color: #2456ba;
        text-decoration: none;
    }

        #eventsControl .event-title a:hover {
            color: #173f91;
            text-decoration: underline;
        }

        #eventsControl .event-title a:focus-visible {
            outline: 3px solid #fdb515;
            outline-offset: 3px;
        }

#eventsControl .event-location,
#eventsControl .event-location-description,
#eventsControl .event-full-date,
#eventsControl .event-time {
    margin: 0 0 3px;
    line-height: 1.4;
}

#eventsControl .event-location {
    font-weight: 500;
}

#eventsControl .event-location-description {
    color: #444;
}

#eventsControl .event-time {
    color: #17446f;
    font-weight: 700;
}

#eventsControl .event-summary {
    margin-top: 10px;
    line-height: 1.55;
}

    #eventsControl .event-summary > :last-child {
        margin-bottom: 0;
    }

#eventsControl .no-events {
    margin: 0;
    padding: 20px;
    color: #333;
    text-align: center;
    background: #fff;
    border: 1px solid #d3dbe8;
    border-radius: 8px;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 640px) {
    #eventsControl.library-events {
        padding: 14px;
    }

    #eventsControl .filter-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    #eventsControl .filter-label-placeholder {
        display: none;
    }

    #eventsControl .event-card {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 10px;
        padding: 15px;
    }

    #eventsControl .event-date-column {
        width: 58px;
        min-width: 58px;
    }

    #eventsControl .date-info {
        width: 54px;
    }
}

@media (max-width: 400px) {
    #eventsControl .event-card {
        grid-template-columns: 1fr;
    }

    #eventsControl .event-date-column {
        width: auto;
    }

    #eventsControl .date-info {
        width: 58px;
    }
}
