/* Yarn Explorer — Events listing & detail (Figma) */

.ye-events-page {
    padding-bottom: var(--ye-page-space-block);
}

.ye-events-hero__content p {
    display: none;
}

.ye-events-filter-card .ye-filter-form {
    padding: 24px 0 28px;
}

.ye-events-filter-top {
    justify-content: flex-end;
    margin-bottom: 4px;
}

.ye-events-filter-top .ye-clear-filter {
    top: 0;
    right: 0;
}

.ye-events-filter-section {
    padding: 0 24px;
    margin-bottom: 18px;
}

.ye-events-filter-section__title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: var(--gray-color);
}

.ye-events-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ye-events-filter-list--scroll {
    max-height: 168px;
    overflow-y: auto;
    padding-right: 4px;
}

.ye-events-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 22px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.ye-events-filter-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ye-events-filter-item__box {
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
    position: relative;
}

.ye-events-filter-item input:checked + .ye-events-filter-item__box {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.ye-events-filter-item input:checked + .ye-events-filter-item__box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ye-events-listing-panel {
    padding: 24px;
}

.ye-events-listing-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.ye-events-search {
    width: 100%;
}

.ye-events-search__field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 14px;
    background: #fff;
}

.ye-events-search__icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.ye-events-search__field input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 22px;
    color: #333;
}

.ye-events-search__field input:focus {
    outline: none;
}

.ye-events-search__field input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.ye-events-view-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.ye-events-view-tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #081b33;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ye-events-view-tab.is-active {
    background: #081b33;
    border-color: #081b33;
    color: #fff;
}

.ye-events-view-tab:not(.is-active):hover {
    border-color: #d1d5db;
}

.ye-event-discover-grid {
    margin-top: 24px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ye-event-discover-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(8, 27, 51, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ye-event-discover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(8, 27, 51, 0.08);
}

.ye-event-discover-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #edf0f3;
    text-decoration: none;
}

.ye-event-discover-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ye-event-discover-card__category {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf0f3;
    color: #081b33;
    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
}

.ye-event-discover-card__body {
    padding: 16px;
    text-align: left;
}

.ye-event-discover-card__title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
    color: var(--gray-color);
}

.ye-event-discover-card__title a {
    color: inherit;
    text-decoration: none;
}

.ye-event-discover-card__title a:hover {
    color: var(--primary-color);
}

.ye-event-discover-card__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}

.ye-event-discover-card__meta-divider {
    display: none;
}

.ye-event-discover-card__location,
.ye-event-discover-card__date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    min-width: 0;
}

.ye-event-discover-card__date span,
.ye-event-discover-card__location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ye-event-discover-card__location {
    color: #0056a7;
}

.ye-event-discover-card__location-link {
    text-decoration: none;
}

.ye-event-discover-card__location-link:hover {
    text-decoration: underline;
}

.ye-event-discover-card__date {
    color: var(--gray-color);
}

.ye-event-discover-card__location img,
.ye-event-discover-card__date img {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.ye-event-discover-card__description {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 22px;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ye-events-calendar {
    margin-top: 24px;
}

.ye-events-calendar__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.ye-events-calendar__month {
    margin: 0;
    min-width: 180px;
    text-align: center;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: #081b33;
}

.ye-events-calendar__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ye-events-calendar__nav-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.ye-events-calendar__grid.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.ye-events-calendar__weekdays,
.ye-events-calendar__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ye-events-calendar__weekday {
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #6b7280;
    text-transform: uppercase;
}

.ye-events-calendar__day {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 96px;
    padding: 8px;
    border: 1px solid #eef0f2;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ye-events-calendar__day:hover {
    background: #f9fafb;
}

.ye-events-calendar__day.is-outside-month {
    background: #f3f4f6;
}

.ye-events-calendar__day.is-outside-month:hover {
    background: #eceff3;
}

.ye-events-calendar__day.is-selected {
    background: #081b33;
    border-color: #081b33;
}

.ye-events-calendar__day.is-selected:hover {
    background: #0a2240;
}

.ye-events-calendar__day-number {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #081b33;
}

.ye-events-calendar__day.is-selected .ye-events-calendar__day-number {
    color: #fff;
}

.ye-events-calendar__day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
}

.ye-events-calendar__event-tag {
    display: block;
    width: 100%;
    padding: 3px 6px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    line-height: 14px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ye-events-calendar__event-tag.is-tone-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.ye-events-calendar__event-tag.is-tone-amber {
    background: #fef3c7;
    color: #b45309;
}

.ye-events-calendar__day.is-selected .ye-events-calendar__event-tag.is-tone-blue {
    background: rgba(219, 234, 254, 0.92);
    color: #1e3a8a;
}

.ye-events-calendar__day.is-selected .ye-events-calendar__event-tag.is-tone-amber {
    background: rgba(254, 243, 199, 0.95);
    color: #92400e;
}

.ye-events-calendar__error {
    padding: 48px 24px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 22px;
}

body.ye-events-calendar-modal-open {
    overflow: hidden;
}

.ye-events-calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ye-events-calendar-modal[hidden] {
    display: none !important;
}

.ye-events-calendar-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 27, 51, 0.45);
}

.ye-events-calendar-modal__dialog {
    position: relative;
    width: min(100%, 360px);
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(8, 27, 51, 0.16);
}

.ye-events-calendar-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #081b33;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ye-events-calendar-modal__media {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 180px;
    overflow: hidden;
    background: #edf0f3;
}

.ye-events-calendar-modal__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ye-events-calendar-modal__category {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #081b33;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.ye-events-calendar-modal__body {
    padding: 16px 16px 18px;
}

.ye-events-calendar-modal__title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    color: #081b33;
}

.ye-events-calendar-modal__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 20px;
    color: #4b5563;
}

.ye-events-calendar-modal__meta[hidden] {
    display: none !important;
}

.ye-events-calendar-modal__location-link {
    text-decoration: none;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.15s ease;
}

.ye-events-calendar-modal__location-link:hover {
    color: #081b33;
}

.ye-events-calendar-modal__location-link:hover span {
    text-decoration: underline;
}

.ye-events-calendar-modal__description {
    margin: 10px 0 16px;
    font-size: 13px;
    line-height: 20px;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ye-events-calendar-modal__description[hidden] {
    display: none !important;
}

.ye-events-calendar-modal__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    background: #081b33;
    color: #fff;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ye-events-calendar-modal__cta:hover {
    background: #0a2240;
    color: #fff;
}

@media (max-width: 991px) {
    .ye-events-calendar__day {
        min-height: 72px;
        padding: 6px;
    }

    .ye-events-calendar__event-tag {
        font-size: 10px;
        line-height: 12px;
    }
}

@media (max-width: 767px) {
    .ye-events-calendar__weekday {
        font-size: 10px;
        padding: 8px 4px;
    }

    .ye-events-calendar__day-number {
        font-size: 12px;
    }

    .ye-events-calendar__day-events {
        display: none;
    }

    .ye-events-calendar__day.is-selected .ye-events-calendar__day-events {
        display: flex;
    }
}

/* ---- Event detail page ---- */

.ye-event-detail-breadcrumb {
    background: var(--primary-color);
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    padding: 17px 0;
    line-height: 26px;
}

.ye-event-detail-breadcrumb a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
}

.ye-event-detail-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.ye-event-detail-breadcrumb [aria-current="page"] {
    font-weight: 600;
}

.ye-event-detail-breadcrumb__sep {
    margin: 0 10px;
    opacity: 0.75;
}

.ye-event-detail-content {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 25px;
    margin-top: var(--ye-page-space-block);
    margin-bottom: var(--ye-page-space-block);
}

.ye-event-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 485px) minmax(0, 1fr);
    gap: 32px;
}

.ye-event-detail-card__media {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    background: #edf0f3;
}

.ye-event-detail-card__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.ye-event-detail-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ye-event-detail-card__image.is-active {
    opacity: 1;
    z-index: 1;
}

.ye-event-detail-card__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(8, 27, 51, 0.12);
    padding: 0;
}

.ye-event-detail-card__nav--prev {
    left: 10px;
}

.ye-event-detail-card__nav--next {
    right: 10px;
}

.ye-event-detail-card__category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf0f3;
    color: #081b33;
    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
}

.ye-event-detail-card__title {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 36px;
    font-weight: 600;
    color: #081b33;
}

.ye-event-detail-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 22px;
    color: #4b5563;
}

.ye-event-detail-card__meta-date,
.ye-event-detail-card__meta-location,
.ye-event-detail-card__meta-location-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.ye-event-detail-card__meta-date {
    color: #4b5563;
    font-weight: 400;
}

.ye-event-detail-card__meta-sep {
    color: #9ca3af;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
}

.ye-event-detail-card__meta-location {
    color: #0056a7;
    font-weight: 600;
}

.ye-event-detail-card__meta-location-link {
    color: #0056a7;
    text-decoration: none;
    font-weight: 600;
}

.ye-event-detail-card__meta-location-link:hover {
    text-decoration: underline;
}

.ye-event-detail-card__meta img {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.ye-event-detail-card__location,
.ye-event-detail-card__date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 22px;
}

.ye-event-detail-card__location {
    color: #0056a7;
}

.ye-event-detail-card__location-link {
    text-decoration: none;
}

.ye-event-detail-card__location-link:hover {
    text-decoration: underline;
}

.ye-event-detail-card__date {
    color: var(--gray-color);
}

.ye-event-detail-card__description {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.ye-event-detail-card__description h3 {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: #081b33;
}

.ye-event-detail-card__description-text {
    font-size: 14px;
    line-height: 24px;
    color: #4b5563;
}

.ye-event-detail-card__actions {
    margin-top: 24px;
}

.ye-event-detail-card__rsvp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ye-event-detail-card__rsvp:hover {
    opacity: 0.9;
}

.ye-event-detail-card__rsvp:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ye-event-detail-card__rsvp.is-active {
    opacity: 0.72;
}

.ye-event-detail-card__rsvp-icon {
    display: block;
    width: 49px;
    height: 24px;
}

@media (max-width: 1100px) {
    .ye-event-discover-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ye-event-detail-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ye-shell.ye-discover-content.ye-events-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ye-event-discover-grid {
        grid-template-columns: 1fr;
    }

    .ye-event-detail-card__meta {
        flex-wrap: wrap;
    }
}
