.aec-widget-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
}

.aec-widget-wrapper.aec-no-sidebar {
    grid-template-columns: 1fr;
}

/* Sidebar Styles */
.aec-sidebar {
    background-color: #f9f6f0;
    border-radius: 6px;
    overflow: hidden;
    height: fit-content;
}

.aec-sidebar-header {
    background-color: #0c2340;
    color: #fff;
    padding: 15px 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    letter-spacing: 1px;
}

.aec-sidebar-body {
    padding: 20px;
}

.aec-filter-group {
    margin-bottom: 25px;
}

.aec-filter-group label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.aec-month-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 13px;
    outline: none;
}

.aec-sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aec-sidebar-category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: color 0.2s;
}

.aec-sidebar-category-item .aec-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.aec-sidebar-category-item .aec-cat-icon svg {
    width: 14px;
    height: 14px;
}

.aec-sidebar-category-item.active {
    font-weight: bold;
}

/* Main Content Area */
.aec-main-content {
    display: flex;
    flex-direction: column;
}

/* Tabs */
.aec-tabs-navigation {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.aec-tab {
    padding: 10px 15px;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.aec-tab.active {
    color: #a82c2c;
    border-bottom-color: #a82c2c;
}

/* Events Cards */
.aec-events-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aec-event-card {
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* --- CALENDAR VIEW (Image on Right, Date Badge on Left) --- */
.view-calendar .aec-event-card {
    display: grid;
    grid-template-columns: 80px 1fr 180px;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.view-calendar .aec-event-image-wrapper {
    order: 3;
    height: 110px;
    border-radius: 6px;
    overflow: hidden;
}

.view-calendar .aec-event-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-calendar .aec-date-badge {
    order: 1;
}

.view-calendar .aec-event-details {
    order: 2;
}

/* --- NEW LIST VIEW DESIGN (Beautiful Compact Horizontal Cards) --- */
.view-list .aec-event-card {
    display: flex;
    align-items: center;
    gap: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

.view-list .aec-event-image-wrapper {
    display: block !important;
    order: 1; /* Image stays completely on the left */
    width: 140px !important;
    height: 100px !important;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.view-list .aec-event-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-list .aec-event-details {
    order: 2; /* Content in the center */
    flex-grow: 1;
}

.view-list .aec-date-badge {
    order: 3; /* Date Badge sits elegantly on the far right */
    margin-left: auto;
    border: 1px solid #0c2340;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Date Badge Styles */
.aec-date-badge {
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    background-color: #fff;
    width: 80px;
    height: fit-content;
    flex-shrink: 0;
}

.aec-date-badge-top {
    background-color: #0c2340;
    color: #fff;
    padding: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.aec-date-badge-bottom {
    padding: 10px 5px;
}

.aec-day-num {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    line-height: 1.1;
}

.aec-day-name {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Event Details Typography & Layout */
.aec-event-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aec-event-title {
    font-size: 18px;
    margin: 0;
    color: #0c2340;
    font-weight: bold;
}

.aec-event-category {
    font-size: 11px;
    font-weight: bold;
    color: #a82c2c;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aec-event-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.aec-event-cat-icon svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.aec-event-desc {
    font-size: 13px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

.aec-event-time {
    font-size: 12px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- MOBILE RESPONSIVE LAYOUT (Pictures on Calendar View) --- */
@media (max-width: 768px) {
    .aec-widget-wrapper {
        grid-template-columns: 1fr;
    }

    /* Calendar View on Mobile: Stacks vertically with the pic beautifully displayed on top */
    .view-calendar .aec-event-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
    }

    .view-calendar .aec-event-image-wrapper {
        display: block !important;
        order: -1; /* Place image on very top of the card! */
        width: 100% !important;
        height: 180px !important;
        border-radius: 6px 6px 0 0;
        margin: -15px -15px 10px -15px;
    }

    .view-calendar .aec-date-badge {
        display: flex;
        width: 100%;
        max-width: 120px;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        border: 1px solid #e2e8f0;
    }

    .view-calendar .aec-date-badge-top {
        padding: 6px 12px;
        border-radius: 4px 0 0 4px;
        min-width: 60px;
    }

    .view-calendar .aec-date-badge-bottom {
        padding: 4px 10px;
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .view-calendar .aec-day-num {
        font-size: 18px;
    }

    .view-calendar .aec-day-name {
        margin-top: 0;
    }

    /* List View on Mobile */
    .view-list .aec-event-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }

    .view-list .aec-event-image-wrapper {
        width: 100% !important;
        height: 150px !important;
        order: 1;
    }

    .view-list .aec-event-details {
        order: 2;
    }

    .view-list .aec-date-badge {
        order: 3;
        margin-left: 0;
        align-self: flex-start;
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
    }

    .view-list .aec-date-badge-top {
        padding: 6px 12px;
        min-width: 60px;
    }

    .view-list .aec-date-badge-bottom {
        padding: 4px 10px;
        display: flex;
        gap: 8px;
        align-items: center;
    }
}
