/* ======================================
   AGENDA STYLES - NEW BOURBON STREET
   ====================================== */

/* List page */
.calendar-list {
    margin: 100px 0px;
}
.listbox.agenda-list {
    background: linear-gradient(97.29deg, #450707 8.21%, #730C0C 57.6%, #450707 117.21%);
    border: 6px solid #730C0C;
    position: relative;
    padding: 15px 60px;
    padding-bottom: 20px;
    container-type: inline-size;
    container-name: agenda-list;
}

@media (max-width: 480px) {
    .listbox.agenda-list {
        padding: 30px 15px;
    }
}

.listbox.agenda-list .topcorners:before,
.listbox.agenda-list .topcorners:after, 
.listbox.agenda-list .bottomcorners:before, 
.listbox.agenda-list .bottomcorners:after  {
    content: "";
    display: block;
    width: 60px;
    height: 60px;
    position: absolute;
    background-image: url(../../img/corner.png);
    background-size: contain;
    background-repeat: no-repeat;
}
.listbox.agenda-list .topcorners:before {
    left: -6px;
    top: -6px;
}
.listbox.agenda-list .topcorners:after {
    right: -6px;
    top: -6px;
    transform: rotate(90deg);
}
.listbox.agenda-list .bottomcorners:before {
    left: -6px;
    bottom: -6px;
    transform: rotate(270deg);
}
.listbox.agenda-list .bottomcorners:after {
    right: -6px;
    bottom: -6px;   
    transform: rotate(180deg);
}

/* Agenda items */
.agenda-item {
    padding: 20px 0;
    transition: 0.3s;
}
.agenda-item:hover {
    background-color: rgba(255, 255, 255, 0.01);
    transition: 0.3s;
    opacity: 0.8;
}
.agenda-item + .agenda-item {
    background-image: linear-gradient(to right, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 0%);
    background-position: top;
    background-size: 6px 1px;
    background-repeat: repeat-x;
}

.agenda-item .agenda-layout {
    display: flex;
    align-items: center;
    gap: 15px; 
}

/* Date section */
.agenda-item .agenda-date {
    text-align: center;
    color: #fff;
    width: 75px;
}

.agenda-item .agenda-date .day {
    font-weight: 100;
    font-size: 16px;
    line-height: 100%;
    text-transform: uppercase;
}

.agenda-item .agenda-date .date-number {
    font-weight: 700;
    font-size: 48px;
    line-height: 100%;
}

.agenda-item .agenda-date .month {
    font-weight: 100;
    font-size: 12px;
    line-height: 100%;
    text-transform: uppercase;
}

/* Image section */
.agenda-item .agenda-image {
    flex-shrink: 0;
}

.agenda-item .agenda-image img {
    object-fit: cover;
    width: 62px;
    height: 76px;
    clip-path: polygon(0 0, 82% 0, 89% 43%, 100% 100%, 0 100%);
    max-width: 62px;
}

/* Content section */
.agenda-item .agenda-content {
    flex: 1;
    min-width: 0;
}

.agenda-item .agenda-title {
    font-family: Crimson Text;
    font-weight: 700;
    font-size: 22px;
    line-height: 102%;
    text-transform: uppercase;
    margin-bottom: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agenda-item .agenda-description {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--white);
}

/* Time section */
.agenda-item .agenda-time {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: right;
    min-width: 107px;
    flex-shrink: 0;
}

/* Link styling */
.listbox.agenda-list a {
    text-decoration: none;
    display: block;
}

.listbox.agenda-list a:hover .agenda-item {
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

/* Hidden items for show more functionality */
.agenda-item-hidden {
    display: none;
}

/* Show More Button */
.show-more-container {
    display: flex;
    width: 100%;
    justify-content: center;
    position: absolute;
    bottom: -20px;
    left:0px;
}

.show-more-container .button {
    position: absolute;
    bottom: 0px;
}

/* ======================================
   AGENDA MOSAIC GRID LAYOUT
   ====================================== */

.agenda-mosaic h2 {
    text-align: center;
    margin-bottom: 40px;
} 

.agenda-mosaic h4.bg {
    text-align: center;
    margin-bottom: 20px;
}

.agenda-mosaic .listbox.agenda-grid {
    padding-bottom: 35px;
    container-type: inline-size;
    container-name: agenda-grid;
}

.agenda-mosaic .listbox.agenda-grid .row {
    margin: 0 -7.5px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.agenda-mosaic .listbox.agenda-grid .row > [class*="col-"] {
    padding: 0 7.5px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    container-type: inline-size;
    container-name: agenda-item-container;
}

.agenda-mosaic .agenda-item .agenda-time {
    padding-right: 10px;
}

.agenda-mosaic .listbox.agenda-grid .row > .col-xs-12:nth-child(1),
.agenda-mosaic .listbox.agenda-grid .row > .col-xs-12:nth-child(2) {
    background-image: linear-gradient(to right, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 0%);
    background-position: bottom;
    background-size: 6px 1px;
    background-repeat: repeat-x;
}

@media (min-width: 768px) {
    .agenda-mosaic .listbox.agenda-grid .row > .col-xs-12:nth-child(1) {
        background-image: 
            linear-gradient(to right, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 0%),
            linear-gradient(to bottom, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 0%);
        background-position: bottom, right;
        background-size: 6px 1px, 1px 6px;
        background-repeat: repeat-x, repeat-y;
    }
    
    .agenda-mosaic .listbox.agenda-grid .row > .col-xs-12:nth-child(3) {
        background-image: linear-gradient(to bottom, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 0%);
        background-position: right;
        background-size: 1px 6px;
        background-repeat: repeat-y;
    }
}

.agenda-mosaic .agenda-item {
    margin-bottom: 0;
    padding-bottom: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.agenda-mosaic .agenda-item a {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.agenda-mosaic .agenda-item .agenda-layout {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 0;
}

.agenda-mosaic .agenda-item .agenda-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
}

.agenda-mosaic .agenda-item .agenda-title {
    flex-shrink: 0;
}

.agenda-mosaic .show-more-container {
    position: relative;
    bottom: auto;
    margin-top: 24px;
    text-align: center;
}


/* Calendar list page adjustments - keep as media query */
@media (max-width: 767px) {
    .calendar-list {
        margin: 60px 0;
    }
}

@container agenda-list (max-width: 465px) {
    .listbox.agenda-list .topcorners:before, .listbox.agenda-list .topcorners:after, .listbox.agenda-list .bottomcorners:before, .listbox.agenda-list .bottomcorners:after {
        width: 35px;
        height: 35px;
    }
    
    .listbox.agenda-list {
        padding: 15px 20px;
        padding-bottom: 20px;
    }
    
    /* Agenda item layout adjustments */
    .agenda-item {
        padding: 15px 0;
    }
    
    .agenda-item .agenda-layout {
        gap: 10px;
        position: relative;
    }
    
    /* Date section - smaller on mobile */
    .agenda-item .agenda-date {
        width: 60px;
    }
    
    .agenda-item .agenda-date .day {
        font-size: 11px;
    }
    
    .agenda-item .agenda-date .date-number {
        font-size: 28px;
    }
    
    .agenda-item .agenda-date .month {
        font-size: 9px;
    }
    
    /* Image section - smaller on mobile */
    .agenda-item .agenda-image img {
        width: 40px;
        height: 50px;
        max-width: 40px;
    }
    
    /* Title smaller on mobile */
    .agenda-item .agenda-title {
        font-size: 16px;
        line-height: 110%;
        max-width: calc(100% - 80px);
    }
    
    .agenda-item .agenda-description {
        font-size: 13px;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    
    /* Time section - smaller on mobile */
    .agenda-item .agenda-time {
        font-size: 14px;
        min-width: 80px;
        position: absolute;
        right: 0;
        top: 0;
    }
}

/* Grid-level container query for grid-specific styling (padding, borders) */
@container agenda-grid (max-width: 465px) {
    .agenda-mosaic .listbox.agenda-grid .topcorners:before,
    .agenda-mosaic .listbox.agenda-grid .topcorners:after,
    .agenda-mosaic .listbox.agenda-grid .bottomcorners:before,
    .agenda-mosaic .listbox.agenda-grid .bottomcorners:after {
        width: 35px;
        height: 35px;
    }
    
    .agenda-mosaic .listbox.agenda-grid {
        padding: 15px 20px;
    }

    .agenda-mosaic .listbox.agenda-grid .row > .col-xs-12 {
        background-image: linear-gradient(to right, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 0%);
        background-position: bottom;
        background-size: 6px 1px;
        background-repeat: repeat-x;
    }
    .agenda-mosaic .listbox.agenda-grid .row > .col-xs-12:last-child {
        background-image: none;
    }
}

/* Individual agenda-item container queries - similar to list view */
@container agenda-item-container (max-width: 465px) {
    .agenda-mosaic .agenda-item {
        margin-bottom: 0;
        padding: 15px 0;
    }
    
    .agenda-mosaic .agenda-item .agenda-layout {
        gap: 10px;
        position: relative;
    }
    
    /* Date section - smaller */
    .agenda-mosaic .agenda-item .agenda-date {
        width: 60px;
    }
    
    .agenda-mosaic .agenda-item .agenda-date .day {
        font-size: 11px;
    }
    
    .agenda-mosaic .agenda-item .agenda-date .date-number {
        font-size: 36px;
    }
    
    .agenda-mosaic .agenda-item .agenda-date .month {
        font-size: 9px;
    }
    
    /* Image section - smaller */
    .agenda-mosaic .agenda-item .agenda-image img {
        width: 40px;
        height: 50px;
        max-width: 40px;
    }
    
    /* Title smaller */
    .agenda-mosaic .agenda-item .agenda-title {
        font-size: 16px;
        line-height: 110%;
        max-width: calc(100% - 80px);
    }
    
    .agenda-mosaic .agenda-item .agenda-description {
        font-size: 13px;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    
    /* Time section - smaller */
    .agenda-mosaic .agenda-item .agenda-time {
        font-size: 12px;
        min-width: 80px;
        position: absolute;
        right: 0;
        top: 0;
        padding-right: 0;
    }
}
