/*
 * Базовые стили отвечают только за компоновку и фирменные UI-акценты.
 * Семейство шрифта, размеры и основной цвет текста наследуются от темы сайта.
 */

.sze-events,
.sze-registration,
.sze-registration-modal {
    font-family: inherit;
    color: inherit;
}

/* ===== Список мероприятий ===== */
.sze-events {
    display: grid;
    gap: 28px;
    width: 100%;
}

.sze-events--single {
    grid-template-columns: minmax(0, 1fr);
}

.sze-events--multiple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
}

.sze-event-card {
    min-width: 0;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 10px 32px rgba(45, 56, 71, .055);
    color: inherit;
}

.sze-events--multiple .sze-event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sze-event-card__top {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(280px, 390px);
    gap: 26px;
    align-items: start;
    margin-bottom: 20px;
}

/* У одиночного мероприятия мета собирается компактно, чтобы карточка не была слишком высокой. */
.sze-events--single .sze-event-card__meta-stack {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
}

.sze-events--single .sze-event-card__image {
    max-height: 225px;
}

.sze-event-card--no-image .sze-event-card__top {
    grid-template-columns: minmax(0, 1fr);
}

.sze-event-card__meta-stack {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.sze-event-card__pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #e2e5e9;
    border-left: 3px solid #FD7238;
    border-radius: 14px;
    background: #ffffff;
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    line-height: 1.25;
}

/* Дата и время оформлены в той же системе, что и метро-чип. */
.sze-event-card__schedule,
.sze-event-card__location-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 8px 13px 8px 12px;
    border: 1px solid #e2e5e9;
    border-left: 3px solid #FD7238;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    font: inherit;
    line-height: 1.2;
}

/* ===== Филиал / метро-чип ===== */
.sze-event-card__branch {
    --sze-metro-color: #999999;

    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 8px 13px 8px 12px;

    border: 1px solid #e2e5e9;
    border-left: 3px solid var(--sze-metro-color);
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    font: inherit;
    line-height: 1.2;
}

.sze-event-card__branch-metro {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background-color: var(--sze-metro-color);

    -webkit-mask-image: url('/wp-content/uploads/2026/03/metro_icon_red.svg');
    mask-image: url('/wp-content/uploads/2026/03/metro_icon_red.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.sze-event-card__branch-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 22px;
    height: 22px;
    box-sizing: border-box;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--sze-metro-color);
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

.sze-event-card__branch--dark-number .sze-event-card__branch-line {
    color: #000000;
}

.sze-event-card__branch-station {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.sze-event-card__image-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.sze-event-card__image {
    display: block;
    width: 100%;
    max-width: 390px;
    height: auto;
    max-height: 260px;
    object-fit: contain;
}

.sze-event-card__body {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    color: inherit;
}

.sze-events--multiple .sze-event-card__body {
    flex: 1 1 auto;
}

.sze-event-card__title {
    margin: 0 0 10px;
    color: inherit;
    font-family: inherit;
}

.sze-event-card__host {
    margin: 0 0 15px;
    color: inherit;
    opacity: .68;
}

.sze-event-card__description {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    color: inherit;
}

.sze-event-card__description p {
    margin: 0 0 12px;
}

.sze-event-card__description p:last-child {
    margin-bottom: 0;
}

.sze-event-card__description ul,
.sze-event-card__description ol {
    margin: 0 0 12px 0;
    padding-left: 24px;
}

.sze-event-card__description li {
    margin-bottom: 6px;
}

.sze-event-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: auto;
}

/* Кнопки — в стиле основной CTA-кнопки сайта.
 * У селекторов намеренно повышена специфичность: Elementor Kit задаёт
 * глобальные стили для button и иначе может перекрыть фон/цвет кнопок. */
.sze-events button.sze-event-card__register,
.sze-registration .sze-registration-form button.sze-registration-form__submit,
.sze-registration-modal .sze-registration-form button.sze-registration-form__submit {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    border: 0 !important;
    border-color: #FD7238 !important;
    border-radius: 14px;
    background: #FD7238 !important;
    background-color: #FD7238 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    text-decoration: none !important;
    font: inherit;
    font-weight: 700;
    padding: 0 24px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(253, 114, 56, .18);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease;
}

.sze-events button.sze-event-card__register:hover,
.sze-events button.sze-event-card__register:focus,
.sze-registration .sze-registration-form button.sze-registration-form__submit:hover,
.sze-registration .sze-registration-form button.sze-registration-form__submit:focus,
.sze-registration-modal .sze-registration-form button.sze-registration-form__submit:hover,
.sze-registration-modal .sze-registration-form button.sze-registration-form__submit:focus {
    background: #FD7238 !important;
    background-color: #FD7238 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    border-color: #FD7238 !important;
    transform: translateY(-1px);
    filter: brightness(.98);
    box-shadow: 0 10px 24px rgba(253, 114, 56, .26);
}

.sze-events button.sze-event-card__register:active,
.sze-registration .sze-registration-form button.sze-registration-form__submit:active,
.sze-registration-modal .sze-registration-form button.sze-registration-form__submit:active {
    transform: translateY(0);
}

.sze-event-card__register:focus-visible,
.sze-registration-form__submit:focus-visible,
.sze-registration-form__input:focus-visible,
.sze-registration-form__select:focus-visible,
.sze-registration-modal__close:focus-visible {
    outline: 2px solid #FD7238;
    outline-offset: 3px;
}

.sze-event-card__status {
    color: inherit;
    opacity: .7;
}

.sze-event-card--cancelled {
    opacity: .72;
}

.sze-events__empty {
    padding: 20px;
    border: 1px dashed #cfd5dc;
    border-radius: 20px;
    background: #ffffff;
    color: inherit;
}

/* ===== Плитка для двух и более мероприятий ===== */
.sze-events--multiple .sze-event-card__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.sze-events--multiple .sze-event-card__image-wrap {
    order: -1;
    justify-content: center;
    min-height: 185px;
}

.sze-events--multiple .sze-event-card__image {
    width: 100%;
    max-width: 100%;
    max-height: 230px;
}

.sze-events--multiple .sze-event-card__meta-stack {
    flex-direction: row;
    flex-wrap: wrap;
}

.sze-events--multiple .sze-event-card__pill,
.sze-events--multiple .sze-event-card__schedule,
.sze-events--multiple .sze-event-card__location-chip,
.sze-events--multiple .sze-event-card__branch {
    min-height: 38px;
}

.sze-events--multiple .sze-event-card__pill,
.sze-events--multiple .sze-event-card__schedule,
.sze-events--multiple .sze-event-card__location-chip {
    padding: 7px 12px 7px 11px;
}

.sze-events--multiple .sze-event-card__branch {
    padding-top: 7px;
    padding-bottom: 7px;
}

/* ===== Форма регистрации ===== */
.sze-registration {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sze-registration-form {
    display: grid;
    gap: 20px;
    box-sizing: border-box;
    color: inherit;
    font-family: inherit;
}

.sze-registration--standalone .sze-registration-form {
    padding: 26px;
    border: 1px solid #e2e5e9;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(45, 56, 71, .04);
}

.sze-registration-form__field {
    display: grid;
    gap: 10px;
}

.sze-registration-form__label {
    color: inherit;
    font-family: inherit;
    font-weight: 600;
}

.sze-registration-form__input,
.sze-registration-form__select {
    width: 100%;
    box-sizing: border-box;
    min-height: 64px;
    border: 1px solid #dfe3e8;
    border-radius: 22px;
    background: #ffffff;
    color: inherit;
    font: inherit;
    padding: 14px 22px;
    outline: none;
    box-shadow: 0 7px 18px rgba(45, 56, 71, .035);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.sze-registration-form__input::placeholder {
    color: #9ca5b3;
    opacity: 1;
}

.sze-registration-form__input:hover,
.sze-registration-form__select:hover {
    border-color: #cfd5dc;
}

.sze-registration-form__input:focus,
.sze-registration-form__select:focus {
    border-color: #FD7238;
    box-shadow: 0 0 0 3px rgba(253, 114, 56, .11), 0 8px 20px rgba(45, 56, 71, .04);
}

.sze-registration-form__submit {
    justify-self: center;
    min-width: 270px;
    min-height: 58px;
    margin-top: 4px;
    border-radius: 18px;
    padding-left: 30px;
    padding-right: 30px;
}

.sze-registration-form__submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sze-registration-form__message:empty {
    display: none;
}

.sze-registration-form__message {
    padding: 13px 16px;
    border-radius: 14px;
    font: inherit;
}

.sze-registration-form__message.is-success {
    background: #eef8e9;
    color: #315c21;
}

.sze-registration-form__message.is-error {
    background: #fff0ef;
    color: #9d2721;
}

/* После сохранения заявки оставляем только итоговый статус, не возвращая
 * пользователю уже очищенные поля формы. */
.sze-registration .sze-registration-form.has-success > :not(.sze-registration-form__message),
.sze-registration-modal .sze-registration-form.has-success > :not(.sze-registration-form__message) {
    display: none;
}

.sze-registration-form.has-success .sze-registration-form__message {
    margin: 0;
}

.sze-registration-form__hint {
    color: inherit;
    opacity: .68;
}

.sze-registration-form__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ===== Модальное окно регистрации ===== */
html.sze-modal-open,
body.sze-modal-open {
    overflow: hidden;
}

.sze-registration-modal[hidden] {
    display: none !important;
}

.sze-registration-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 24px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.sze-registration-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.sze-registration-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 14, .58);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sze-registration-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(92vh, 900px);
    overflow: auto;
    box-sizing: border-box;
    padding: 38px 36px 34px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 40px;
    background: linear-gradient(145deg, #ffffff 0%, #ffffff 72%, #fff8f4 100%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
    outline: none;
    transform: translateY(14px) scale(.985);
    transition: transform .2s ease;
    color: inherit;
    font-family: inherit;
    scrollbar-width: thin;
}

.sze-registration-modal.is-open .sze-registration-modal__dialog {
    transform: translateY(0) scale(1);
}

.sze-registration-modal button.sze-registration-modal__close {
    position: absolute;
    top: 28px;
    right: 28px;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid #e7e9ed;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94) !important;
    background-color: rgba(255, 255, 255, .94) !important;
    color: transparent !important;
    font-size: 0;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(45, 56, 71, .06);
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.sze-registration-modal__close::before,
.sze-registration-modal__close::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 1.5px;
    border-radius: 2px;
    background: #69717d;
}

.sze-registration-modal__close::before {
    transform: rotate(45deg);
}

.sze-registration-modal__close::after {
    transform: rotate(-45deg);
}

.sze-registration-modal button.sze-registration-modal__close:hover,
.sze-registration-modal button.sze-registration-modal__close:focus {
    transform: translateY(-1px);
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: transparent !important;
    border-color: #daddE2 !important;
}

.sze-registration-modal__header {
    padding-right: 78px;
    margin-bottom: 26px;
}

.sze-registration-modal__title {
    margin: 0 0 8px;
    color: inherit;
    font-family: inherit;
}

.sze-registration-modal__subtitle {
    margin: 0;
    color: inherit;
    opacity: .72;
}

.sze-registration--modal .sze-registration-form {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.sze-registration--modal .sze-registration-form__message {
    margin-bottom: 2px;
}

/* ===== Адаптив ===== */
@media (max-width: 1050px) {
    .sze-events--multiple {
        grid-template-columns: minmax(0, 1fr);
    }

    .sze-events--multiple .sze-event-card__top {
        grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
    }

    .sze-events--multiple .sze-event-card__image-wrap {
        order: 0;
        min-height: 0;
        justify-content: flex-end;
    }

    .sze-events--multiple .sze-event-card__meta-stack {
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
    }
}

@media (max-width: 760px) {
    .sze-event-card__top,
    .sze-events--multiple .sze-event-card__top {
        grid-template-columns: minmax(0, 1fr);
    }

    .sze-event-card__image-wrap,
    .sze-events--multiple .sze-event-card__image-wrap {
        order: -1;
        justify-content: center;
    }

    .sze-event-card__image,
    .sze-events--multiple .sze-event-card__image {
        max-width: 100%;
        max-height: 240px;
    }

    .sze-event-card__meta-stack,
    .sze-events--single .sze-event-card__meta-stack,
    .sze-events--multiple .sze-event-card__meta-stack {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sze-registration-modal {
        padding: 14px;
    }

    .sze-registration-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 28px);
        padding: 30px 22px 26px;
        border-radius: 30px;
    }

    .sze-registration-modal button.sze-registration-modal__close {
        top: 18px;
        right: 18px;
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .sze-registration-modal__header {
        padding-right: 58px;
        margin-bottom: 22px;
    }

    .sze-registration-form__input,
    .sze-registration-form__select {
        min-height: 58px;
        border-radius: 18px;
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 520px) {
    .sze-events {
        gap: 20px;
    }

    .sze-event-card,
    .sze-registration--standalone .sze-registration-form {
        padding: 18px;
        border-radius: 22px;
    }

    .sze-event-card__top {
        gap: 16px;
        margin-bottom: 16px;
    }

    .sze-event-card__pill {
        min-height: 36px;
        padding: 6px 11px;
    }

    .sze-event-card__register,
    .sze-registration-form__submit {
        width: 100%;
    }

    .sze-registration-modal {
        align-items: end;
        padding: 8px;
    }

    .sze-registration-modal__dialog {
        max-height: calc(100dvh - 16px);
        padding: 26px 16px 18px;
        border-radius: 26px;
    }

    .sze-registration-modal button.sze-registration-modal__close {
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
    }

    .sze-registration-modal__header {
        padding-right: 52px;
        margin-bottom: 20px;
    }

    .sze-registration-form {
        gap: 17px;
    }

    .sze-registration-form__field {
        gap: 8px;
    }

    .sze-registration-form__submit {
        min-width: 0;
        min-height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sze-registration-modal,
    .sze-registration-modal__dialog,
    .sze-registration-modal__close,
    .sze-event-card__register,
    .sze-registration-form__submit {
        transition: none;
    }
}

/* Согласия в форме регистрации */
.sze-registration-form__consents {
    display: grid;
    gap: 12px;
}

.sze-registration-form__consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    cursor: pointer;
    line-height: 1.4;
}

.sze-registration-form__consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #FD7238;
}

.sze-registration-form__consent a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #FD7238;
    text-underline-offset: 2px;
}
