/* Events Manager - Styles */

/* Header */
.em-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.em-calendar-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--e-global-color-secondary, #172857);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Filters */
.em-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.em-filter-dropdown {
    position: relative;
}

.em-caret {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    margin-left: 0.35em;
    transition: transform 0.2s;
}

.em-caret i,
.em-caret svg {
    display: block;
}

.em-filter-btn {
    font-weight: bold;
}

.em-filter-btn.is-active .em-caret {
    transform: rotate(180deg);
}

/* Dropdown menu */
.em-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
    z-index: 9999;
    overflow: hidden;
}

.em-dropdown-menu.is-open {
    display: block;
}

.em-filter-option {
    display: block;
    padding: 11px 18px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.em-filter-option:last-child {
    border-bottom: none;
}

.em-filter-option:hover {
    background: #f5f7ff;
    color: #1a1a2e;
}

.em-filter-option.active {
    color: #1a1a2e;
    font-weight: 700;
    background: #eef1ff;
}

/* Divider */
.em-calendar-divider {
    height: 15px;
    background: var(--e-global-color-secondary, #172857);
    margin-bottom: 0;
}

/* Column Labels */
.em-column-labels {
    display: flex;
    gap: 8px;
    padding: 12px 16px 12px 85px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    font-size: 16px;
}

.em-column-labels span:nth-child(1) {
    width: 180px;
    flex-shrink: 0;
}

.em-column-labels span:nth-child(2) {
    flex: 1;
}

.em-column-labels span:nth-child(3) {
    width: 135px;
    flex-shrink: 0;
}

/* Event Items */
.em-events-list {
    display: flex;
    flex-direction: column;
    row-gap: 15px;
}

.em-event-item {
    display: flex;
    align-items: stretch;
    background: #F8F8F8;
    transition-property: background-color, border-color, box-shadow;
    transition-duration: 0.15s;
    transition-timing-function: ease;
    min-height: 90px;
    padding-left: 70px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    column-gap: 20px;
    text-decoration: none;
    color: inherit;
}

.em-event-item:hover {
    background: #fafafa;
    color: inherit;
}

.em-event-content,
.em-event-action {
    position: relative;
}

.em-badge {
    z-index: 1;
}

/* Badge - diagonal ribbon from top to bottom (full diagonal of item) */
.em-badge {
    --slant: 45%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50px;
    background-color: #12224d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    clip-path: polygon(var(--slant) 0%, 100% 0%, calc(100% - var(--slant)) 100%, 0% 100%);
}

.em-badge span {
    transform: rotate(191deg);
}

.em-badge--sponsoring {
    background-color: #F5872A;
}

.em-badge--attending {
    background-color: #1a1a2e;
}

/* Content */
.em-event-content {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.em-event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.em-event-date {
    font-weight: 600;
}

.em-event-name {
    font-weight: 600;
}

.em-event-location {
    font-weight: 600;
}

.em-divider {
    height: 20px;
    width: 2px;
    background: #000;
}

.em-event-description {
    line-height: 1.5;
}

/* Learn More */
.em-event-action {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    flex-shrink: 0;
}

.elementor .em-learn-more {
    text-decoration: underline;
}

.em-learn-more {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--e-global-color-secondary);
    text-decoration: underline;
    text-transform: uppercase;
    white-space: nowrap;
    padding-bottom: 0;
}

.em-learn-more:hover {
}

/* Loading & No Events */
.em-loading {
    text-align: center;
    padding: 24px;
    color: #666;
    font-style: italic;
}

.em-no-events {
    text-align: center;
    padding: 32px;
    color: #888;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .em-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .em-column-labels {
        display: none;
    }

    .em-event-item {
        flex-direction: column;
    }

    .em-badge {
        width: 70px;
        --slant: 45%;
        height: 150px;
        transform: rotate(30deg);
        top: -40px;
    }

    .em-badge span {
        transform: rotate(192deg);
    }

    .em-event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .em-divider {
        display: none;
    }

    .em-event-action {
        padding-top: 0;
    }

    .em-events-list {
        margin-top: 20px;
    }
}

/* Single event: type ribbon (left, arrow left) + date/location list (right) */
.em-single-event-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25em;
    padding: 0.75em 0;
    font-size: 1em;
    color: #000;
    position: relative;
    justify-content: space-between;
}

.em-single-event-meta--vertical .em-single-event-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    font-size: 21px;
}

.em-single-event-meta .em-single-meta-item {
    display: block;
}

.em-single-event-meta strong {
    font-weight: 600;
    margin-right: 0.25em;
}

/* Type ribbon on the left - arrow pointing left, same colors as list badge */
.em-single-type-ribbon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4em 1.5em 0.4em 1.75em;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
    clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%);
    font-size: 21px;
}

.em-single-type-ribbon--sponsoring {
    background-color: var(--e-global-color-primary);
}

.em-single-type-ribbon--attending {
    background-color: var(--e-global-color-secondary);
}

.em-single-type-ribbon--default {
    background-color: #666;
}
