/* ==========================================================================
   SESSION PICKER STYLES
   ========================================================================== */

#ajax-sessions-wrapper { transition: opacity 0.2s ease, filter 0.2s ease; min-height: 300px; }
#ajax-sessions-wrapper.is-loading { opacity: 0; filter: blur(8px); pointer-events: none; }



.page-hero { text-align: center; max-width: 800px; margin: 0 auto 3rem auto; padding: 0 1rem; display: flex; flex-direction: column; align-items: center; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; margin-bottom: 0.5rem; color: var(--color-roerich-ultramarine); }
.hero-subtitle { font-family: var(--font-utility); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem; opacity: 0.5; font-weight: 800; color: var(--color-abyss-ink); }

.section-divider { display: flex; align-items: center; gap: 1.5rem; margin: 3rem auto 2rem auto; max-width: 1200px; transition: opacity 0.3s ease; }
.section-title { font-size: 1.5rem; margin: 0; color: var(--color-roerich-ultramarine); white-space: nowrap; font-family: var(--font-majestic); }
.divider-line { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(0, 80, 136, 0.2), transparent); }

.session-artifact { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 2.5rem; min-height: 320px; z-index: 1; text-decoration: none; transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.session-artifact-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.15; z-index: -1; transition: opacity 0.4s ease, transform 0.6s ease; }
.session-artifact:hover { transform: translateY(-4px); }
.session-artifact:hover .session-artifact-bg { opacity: 0.3; transform: scale(1.05); }

.status-badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: clamp(0.5rem, 0.75vw + 0.5rem, 0.75rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.is-active-card { border: 2px solid var(--color-fiery-orange); box-shadow: 0 0 20px 0 rgba(255, 130, 58, 0.15); }
.is-active-card .status-badge { background: var(--color-fiery-orange); color: white; }
.is-past-card { opacity: 0.7; filter: grayscale(40%); }
.is-past-card:hover { opacity: 1; filter: grayscale(0%); }
.is-past-card .status-badge {
    background-color: rgba(0, 80, 136, 0.08);
    color: var(--color-roerich-ultramarine);
    border: 1px solid rgba(0, 80, 136, 0.2);
}

.roerich-stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 5; }

.filters-wrapper { display: flex;
    justify-content: center;margin-bottom: 3rem; width: 100%; -webkit-mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent); mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent); }
.status-filters { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0.5rem; padding: 0.25rem 24px; margin-bottom: 0; scrollbar-width: none; scroll-snap-type: x mandatory; }
.status-filters::-webkit-scrollbar { display: none; }
.status-filters .filter-btn { white-space: nowrap; flex-shrink: 0; scroll-snap-align: center; }
.filter-btn { background: transparent; border: none; padding: 0.5rem 1rem; border-radius: 1.5rem; font-family: var(--font-utility); font-size: 0.875rem; font-weight: 600; color: var(--color-roerich-ultramarine); cursor: pointer; transition: all 0.3s ease; }
.filter-btn:hover { background: rgba(0, 80, 136, 0.05); }
.filter-btn.active { background: var(--color-roerich-ultramarine); color: var(--color-snow-summit, #fff); }
.filter-btn[data-target="active-sessions"].active { background: var(--color-fiery-orange); }

.session-container {
position: relative; z-index: 10; flex: 1; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
}
.session-title {
    font-size: var(--text-h2-epic);}

.session-info-block {
    min-width: 0;          /* Критически важно: не дает длинному тексту распирать блок наружу */
}

.session-edit-btn {
    align-self: flex-start; /* Игнорирует нижнее выравнивание контейнера и улетает в самый ВЕРХ */
    flex-shrink: 0;         /* Запрещает кнопке сжиматься, если текст станет слишком длинным */
}
@media (max-width: 768px) {
    .page-hero { margin-bottom: 2rem; }
    .session-artifact { padding: 1.5rem; min-height: 220px; width: 100%; box-sizing: border-box; }

    .session-container {
    justify-content:start;
    align-items: flex-end;}
    .session-info-block {
    flex: 1;          /* Критически важно: не дает длинному тексту распирать блок наружу */
}
}

form > button {
margin-top:2rem;}