/* ================================================================
   PoliticalLeaderPortal - HOME UPCOMING EVENTS
   Single-owner stylesheet for _UpcomingEvents.cshtml.

   IMPORTANT:
   The public wrapper is .home-events-slot (not legacy .home-ref-events),
   and the partial does not use legacy .field-events-* classes.
   Therefore old Home reference/event CSS cannot conflict with this section.
   ================================================================ */

body.public-home-layout .campaign-home-page .home-events-slot {
    width: 100%;
    margin: 0 !important;
    padding: 14px 0 12px !important;
    background: #eef3f7 !important;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-section,
body.public-home-layout .campaign-home-page .home-events-slot .home-events-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
    width: min(1848px, calc(100% - 72px));
    margin: 0 auto;
    padding: 0 24px 22px;
    overflow: hidden;
    border: 1px solid #dce4ed;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(16,35,66,.055);
    font-family: "Noto Sans Devanagari", "Nirmala UI", Inter, sans-serif;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 2px;
    border-bottom: 1px solid #edf1f4;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-title {
    min-width: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #102342;
    font-family: "Noto Sans Devanagari", "Nirmala UI", Inter, sans-serif;
    font-size: 21px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.015em;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-title i {
    color: #f4510b;
    font-size: 19px;
    line-height: 1;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-view-all {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    border: 0;
    color: #667789;
    background: transparent;
    font-family: "Noto Sans Devanagari", "Nirmala UI", Inter, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-view-all i {
    font-size: 10px;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-view-all:hover,
body.public-home-layout .campaign-home-page .home-events-slot .home-events-view-all:focus {
    color: #f4510b;
    text-decoration: none;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-scroller {
    padding-top: 18px;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-scroll-viewport {
    width: 100%;
    max-height: none;
    overflow: visible;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-card {
    min-width: 0;
    height: 156px;
    display: grid;
    grid-template-rows: 1fr 32px;
    gap: 10px;
    padding: 14px 16px 12px;
    overflow: hidden;
    border: 1px solid #dce4ed;
    border-radius: 11px;
    background: #f8fafc;
    box-shadow: none;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-date {
    width: 64px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ffc247;
    border-radius: 7px;
    color: #ef5409;
    background: #fff7d9;
    line-height: 1;
    text-align: center;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-date strong {
    font-family: Inter, Arial, sans-serif;
    font-size: 20px;
    font-weight: 850;
    line-height: 1;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-date span {
    margin-top: 5px;
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-date small {
    margin-top: 3px;
    color: #ef5409;
    font-family: Inter, Arial, sans-serif;
    font-size: 8px;
    font-weight: 750;
    line-height: 1;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-copy {
    min-width: 0;
    align-self: center;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-copy h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 7px;
    color: #102342;
    font-family: "Noto Sans Devanagari", "Nirmala UI", Inter, sans-serif;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-copy p {
    min-width: 0;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: #667789;
    font-family: "Noto Sans Devanagari", "Nirmala UI", Inter, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-copy p i {
    flex: 0 0 auto;
    color: #f4510b;
    font-size: 11px;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-copy p span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-details {
    width: 100%;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 5px;
    color: #ffffff;
    background: #f4510b;
    font-family: "Noto Sans Devanagari", "Nirmala UI", Inter, sans-serif;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background-color .16s ease, transform .16s ease;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-event-details:hover,
body.public-home-layout .campaign-home-page .home-events-slot .home-event-details:focus {
    color: #ffffff;
    background: #dc4305;
    transform: translateY(-1px);
    text-decoration: none;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-empty {
    min-height: 128px;
    display: grid;
    place-items: center;
    color: #6d7984;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 1199.98px) {
    body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
        width: calc(100% - 40px);
        padding-inline: 18px;
    }

    body.public-home-layout .campaign-home-page .home-events-slot .home-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 767.98px) {
    body.public-home-layout .campaign-home-page .home-events-slot {
        padding: 10px 0 !important;
    }

    body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
        width: calc(100% - 24px);
        padding: 0 13px 14px;
        border-radius: 11px;
    }

    body.public-home-layout .campaign-home-page .home-events-slot .home-events-header {
        height: 54px;
    }

    body.public-home-layout .campaign-home-page .home-events-slot .home-events-title {
        font-size: 17px;
    }

    body.public-home-layout .campaign-home-page .home-events-slot .home-events-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.public-home-layout .campaign-home-page .home-events-slot .home-event-card {
        height: 148px;
        padding: 12px;
    }
}


/* ================================================================
   v2 - GLOBAL HOME RAIL ALIGNMENT
   Upcoming Events must share the exact left/right rail used by the
   Photo/Video/Reels/Wallpaper/Poster/News media grid.
   ================================================================ */

body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
    width: var(--home-media-rail, min(1840px, calc(100% - 64px))) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* The media composition changes --home-media-rail at breakpoints.
   Reuse that same variable instead of introducing separate event widths. */
@media (max-width: 1199.98px) {
    body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
        width: var(--home-media-rail, calc(100% - 40px)) !important;
    }
}

@media (max-width: 991.98px) {
    body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
        width: var(--home-media-rail, calc(100% - 32px)) !important;
    }
}

@media (max-width: 767.98px) {
    body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
        width: var(--home-media-rail, calc(100% - 22px)) !important;
    }
}


/* ================================================================
   v3 - SHARED SECTION RHYTHM
   Upcoming Events / Home Members / People Say use the same 14px gap.
   ================================================================ */
body.public-home-layout .campaign-home-page .home-events-slot {
    width: 100% !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    background: #eef3f7 !important;
}

body.public-home-layout .campaign-home-page .home-events-slot .home-events-panel {
    width: var(--home-media-rail, min(1840px, calc(100% - 64px))) !important;
    margin: 0 auto !important;
}
