/**
 * Asimmetric Events - Lokomov-Style Event List
 * Clean, minimal design with expandable descriptions
 */

/* Reset and base styles */
.asimmetric-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 900px;
}

/* Individual event item */
.asimmetric-event {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.asimmetric-event:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Event with image - different layout */
.asimmetric-event.has-image {
    grid-template-columns: 100px 80px 1fr;
    transition: grid-template-columns 0.3s ease;
}

.asimmetric-event.has-image .event-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    transition: width 0.3s ease, height 0.3s ease;
    cursor: pointer;
}

/* Expanded: image larger, description next to it */
.asimmetric-event.has-image.expanded {
    grid-template-columns: 200px 80px 1fr;
    grid-template-rows: auto auto;
}

.asimmetric-event.has-image.expanded .event-thumbnail {
    width: 200px;
    height: 200px;
    grid-column: 1;
    grid-row: 1 / 3;
}

.asimmetric-event.has-image.expanded .event-date {
    grid-column: 2;
    grid-row: 1;
}

.asimmetric-event.has-image.expanded .event-info {
    grid-column: 3;
    grid-row: 1;
}

.asimmetric-event.has-image.expanded .event-description {
    grid-column: 2 / 4;
    grid-row: 2;
}

/* Events beyond cutoff date - hidden by default */
.asimmetric-event.beyond-cutoff {
    display: none;
}

.asimmetric-events-list.show-all .asimmetric-event.beyond-cutoff {
    display: grid;
}

/* Show more button */
.asimmetric-show-more-events {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 1.5rem 0;
    padding: 0.875rem 1.5rem;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.asimmetric-show-more-events:hover {
    background: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.9);
}

.asimmetric-show-more-events.hidden {
    display: none;
}

/* Date column */
.event-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-weight: 700;
    line-height: 1.1;
}

.event-date .day {
    font-size: 2rem;
    color: var(--event-accent-color, #000);
}

.event-date .month {
    font-size: 1.5rem;
    color: var(--event-accent-color, #000);
}

.event-date .weekday {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
    text-transform: capitalize;
    margin-top: 0.25rem;
}

/* Event info */
.event-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.event-link:hover {
    text-decoration: none;
}

.event-time {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.7);
}

.event-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    background-color: var(--event-type-bg, rgba(0, 0, 0, 0.1));
    color: var(--event-type-color, #fff);
    border-radius: 3px;
    font-weight: 600;
}

/* Event type colors */
.event-type[data-type="DJ"],
.asimmetric-event:has(.event-type:contains("DJ")) .event-type {
    background-color: rgba(147, 51, 234, 0.3);
}

.event-type[data-type="KONZERT"] {
    background-color: rgba(239, 68, 68, 0.3);
}

.event-type[data-type="SCREENING"] {
    background-color: rgba(59, 130, 246, 0.3);
}

.event-type[data-type="QUIZ"] {
    background-color: rgba(34, 197, 94, 0.3);
}

.event-type[data-type="TANZ"] {
    background-color: rgba(236, 72, 153, 0.3);
}

.event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    display: block;
    width: 100%;
    margin-top: 0.25rem;
}

/* Expandable description */
.event-description {
    display: none;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.asimmetric-event.expanded .event-description {
    display: block;
}

/* For events without image, description spans all columns */
.asimmetric-event:not(.has-image) .event-description {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
}

.event-description-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.85);
}

.event-description-text p {
    margin: 0 0 1rem 0;
}

.event-description-text p:last-child {
    margin-bottom: 0;
}

/* Short description - emphasized */
.event-description-text .short-description {
    font-weight: 500;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Long description */
.event-description-text .long-description {
    margin-bottom: 1rem;
}

.event-description-text .long-description p {
    margin: 0 0 0.75rem 0;
}

/* Calendar download link */
.event-calendar-link {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.event-calendar-link .ics-download {
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.event-calendar-link .ics-download:hover,
.event-calendar-link .gcal-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.event-calendar-link .gcal-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.event-calendar-link .calendar-separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* Expand indicator */
.asimmetric-event.expandable::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.asimmetric-event.expandable.expanded::after {
    content: '−';
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No events message */
.no-events {
    text-align: center;
    padding: 3rem;
    color: rgba(0, 0, 0, 0.6);
    font-style: italic;
}

/* Archive styles */
.asimmetric-events-archive {
    max-width: 900px;
}

.archive-month {
    margin-bottom: 2rem;
}

.archive-month-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--event-accent-color, #000);
}

.archive-events-list {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .asimmetric-event {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .asimmetric-event.has-image {
        grid-template-columns: 1fr;
    }

    .asimmetric-event.has-image .event-thumbnail {
        width: 100%;
        height: 200px;
        margin-bottom: 0.5rem;
        grid-row: auto;
    }

    .asimmetric-event.has-image.expanded {
        grid-template-columns: 1fr;
    }

    .asimmetric-event.has-image.expanded .event-thumbnail {
        width: 100%;
        height: 250px;
    }

    .event-date .day {
        font-size: 1.5rem;
    }

    .event-date .month {
        font-size: 1.125rem;
    }

    .event-title {
        font-size: 1rem;
    }

    .archive-month-header {
        font-size: 1.25rem;
    }
}

/* Light theme override (if needed) */
@media (prefers-color-scheme: light) {
    .asimmetric-events-list {
        --event-accent-color: #1a1a1a;
        --event-type-color: #333;
    }

    .asimmetric-event {
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }

    .asimmetric-event:hover {
        background-color: rgba(0, 0, 0, 0.03);
    }

    .event-date .weekday,
    .event-time {
        color: rgba(0, 0, 0, 0.6);
    }

    .event-title {
        color: #1a1a1a;
    }

    .event-description {
        background-color: rgba(0, 0, 0, 0.03);
    }

    .event-description-text {
        color: rgba(0, 0, 0, 0.85);
    }

    .asimmetric-event.expandable::after {
        color: rgba(0, 0, 0, 0.4);
    }

    .no-events {
        color: rgba(0, 0, 0, 0.6);
    }
}

/* Force dark theme (use this if your site is dark) */
.asimmetric-events-list.dark-theme {
    --event-accent-color: #fff;
    --event-type-color: #fff;
}

/* Lightbox overlay */
.asimmetric-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.asimmetric-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.asimmetric-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Make main thumbnail clickable for lightbox when expanded */
.asimmetric-event.expanded .event-thumbnail {
    cursor: zoom-in;
}

.asimmetric-event.expanded .event-thumbnail:hover {
    opacity: 0.85;
}

/* PDF Download Section */
.asimmetric-pdf-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    text-align: center;
}

.asimmetric-pdf-download-link,
.asimmetric-pdf-download {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2c3e50;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.asimmetric-pdf-download-link:hover,
.asimmetric-pdf-download:hover {
    background-color: #34495e;
}

.pdf-icon {
    font-size: 1.2em;
    margin-right: 0.5rem;
}

.pdf-not-available {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 1rem;
}
