/* Подключить ПОСЛЕ существующих CSS сайта. Меняются только новые карточки афиши. */
#afishaFilter .afisha-card.afisha-row {
    --afisha-gold: #d39c4a;
    float: none;
    clear: both;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding: 20px 15px 28px !important;
    margin: 0 !important;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    background: transparent;
    color: #242424;
    box-shadow: none;
    overflow: visible;
    font-family: "Oranienbaum", Georgia, serif;
    text-align: left;
    box-sizing: border-box;
}

#afishaFilter .afisha-card.afisha-row:hover {
    color: #242424;
    background: transparent;
    box-shadow: none;
}

/* Сетка внутри карточки: display внешнего .mix остается под управлением фильтра. */
#afishaFilter .afisha-row__layout {
    display: grid;
    grid-template-columns: 180px 272px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

#afishaFilter .afisha-row__when {
    padding-top: 40px;
    text-align: center;
}

#afishaFilter .afisha-row__date {
    display: block;
    color: var(--afisha-gold);
    line-height: 1;
    white-space: nowrap;
}

#afishaFilter .afisha-row__day { font-size: 50px; }
#afishaFilter .afisha-row__month { font-size: 26px; }

#afishaFilter .afisha-row__weekday {
    margin-top: 2px;
    font-size: 20px;
    line-height: 1.15;
    text-transform: uppercase;
}

#afishaFilter .afisha-row__time {
    margin-top: 23px;
    font-size: 26px;
    line-height: 1.2;
}

#afishaFilter .afisha-row__photo {
    display: block;
    width: 100%;
    aspect-ratio: 304 / 223;
    overflow: hidden;
    background: #f5f5f5;
}

#afishaFilter .afisha-row__photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
}

#afishaFilter .afisha-row__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 202px;
}

#afishaFilter .afisha-row__stage {
    margin: 8px 0 18px;
    color: #858585;
    font-size: 21px;
    line-height: 1.2;
    text-transform: uppercase;
}

#afishaFilter .afisha-row__author {
    margin: 0 0 3px;
    color: var(--afisha-gold);
    font-size: 21px;
    line-height: 1.2;
}

#afishaFilter .afisha-row__title {
    margin: 0;
    padding: 0;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.05;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

#afishaFilter .afisha-row__title a {
    color: inherit;
    text-decoration: none;
}

#afishaFilter .afisha-row__title a:hover { color: var(--afisha-gold); }

#afishaFilter .afisha-row__description {
    margin: 3px 0 0;
    color: #242424;
    font-size: 20px;
    line-height: 1.3;
}

#afishaFilter .afisha-row__note {
    margin: 22px 0 0;
    padding: 12px 18px;
    background: #f5f5f5;
    color: #d92323;
    font-size: 21px;
    line-height: 1.3;
}

#afishaFilter .afisha-row__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px 20px;
    margin-top: auto;
    padding-top: 20px;
}

#afishaFilter .afisha-row__duration {
    position: relative;
    padding-left: 42px;
    font-size: 17px;
    line-height: 28px;
}

/* Иконка часов без отдельного изображения. */
#afishaFilter .afisha-row__duration::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 24px;
    height: 24px;
    border: 1px solid var(--afisha-gold);
    border-radius: 50%;
}

#afishaFilter .afisha-row__duration::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 6px;
    width: 7px;
    height: 9px;
    border-left: 1px solid var(--afisha-gold);
    border-bottom: 1px solid var(--afisha-gold);
    transform: skewY(24deg);
}

#afishaFilter .afisha-row__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

#afishaFilter .afisha-row .afisha-row__pushkin {
    display: none;
    position: static;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Сохраняем имя класса из существующего TV pushkin (puhskin-icon). */
#afishaFilter .afisha-row .afisha-row__pushkin.puhskin-icon { display: block; }

#afishaFilter .afisha-row__age {
    font-size: 17px;
    line-height: 1;
    white-space: nowrap;
}

#afishaFilter .afisha-row__ticket { max-width: 100%; }

/* diferent_date может вернуть любой из существующих типов кнопок. */
#afishaFilter .afisha-row .afisha-row__ticket .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 176px;
    max-width: 100%;
    min-height: 50px;
    height: auto;
    margin: 0;
    padding: 12px 24px;
    border: 0;
    border-radius: 0;
    background-color: var(--afisha-gold);
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    cursor: pointer;
    box-sizing: border-box;
}

#afishaFilter .afisha-row .afisha-row__ticket .btn::before,
#afishaFilter .afisha-row .afisha-row__ticket .btn::after { display: none; }

#afishaFilter .afisha-row .afisha-row__ticket .btn:hover { background-color: #b98136; }

#afishaFilter .afisha-row .afisha-row__ticket .btn.btn-grey,
#afishaFilter .afisha-row .afisha-row__ticket .btn:disabled,
#afishaFilter .afisha-row .afisha-row__ticket .btn[aria-disabled="true"] {
    background-color: #a2a2a2;
    color: #fff;
    cursor: default;
}

#afishaFilter .afisha-row a:focus-visible,
#afishaFilter .afisha-row button:focus-visible {
    outline: 2px solid #916223;
    outline-offset: 4px;
}

/* Теги без пробелов вокруг MODX-вызова: пустые поля исчезают вместе с отступами. */
#afishaFilter .afisha-row__author:empty,
#afishaFilter .afisha-row__description:empty,
#afishaFilter .afisha-row__note:empty,
#afishaFilter .afisha-row__duration:empty,
#afishaFilter .afisha-row__age:empty { display: none; }

@media (max-width: 1199px) {
    #afishaFilter .afisha-row__layout { grid-template-columns: 145px 240px minmax(0, 1fr); }
    #afishaFilter .afisha-row__title { font-size: 30px; }
}

@media (max-width: 991px) {
    #afishaFilter .afisha-row__layout { grid-template-columns: 110px 210px minmax(0, 1fr); gap: 16px; }
    #afishaFilter .afisha-row__when { padding-top: 20px; }
    #afishaFilter .afisha-row__day { font-size: 44px; }
    #afishaFilter .afisha-row__weekday { font-size: 16px; }
    #afishaFilter .afisha-row__stage { font-size: 18px; margin-top: 0; margin-bottom: 12px; }
    #afishaFilter .afisha-row__title { font-size: 27px; }
    #afishaFilter .afisha-row__description { font-size: 18px; }
}

@media (max-width: 767px) {
    #afishaFilter .afisha-card.afisha-row { padding: 20px 15px 24px !important; }
    #afishaFilter .afisha-row__layout { grid-template-columns: 94px minmax(0, 1fr); gap: 16px; }
    #afishaFilter .afisha-row__when { padding-top: 10px; }
    #afishaFilter .afisha-row__month { font-size: 22px; }
    #afishaFilter .afisha-row__weekday { font-size: 14px; }
    #afishaFilter .afisha-row__time { font-size: 24px; margin-top: 16px; }
    #afishaFilter .afisha-row__info { grid-column: 1 / -1; min-height: 0; }
    #afishaFilter .afisha-row__photo { max-width: 304px; }
    #afishaFilter .afisha-row__title { font-size: 29px; }
    #afishaFilter .afisha-row__author { font-size: 20px; }
    #afishaFilter .afisha-row__note { margin-top: 16px; font-size: 19px; padding: 12px; }
    #afishaFilter .afisha-row__footer { margin-top: 0; padding-top: 16px; }
    #afishaFilter .afisha-row__actions { gap: 10px; }
}

/* Совместимость с существующей версией для слабовидящих. */
.specView #afishaFilter .afisha-row__photo { display: none; }
.specView #afishaFilter .afisha-row__layout { grid-template-columns: 160px minmax(0, 1fr); }
.specView #afishaFilter .afisha-row__info { grid-column: auto; }
.specView #afishaFilter .afisha-row__title { font-size: inherit; }
.specView #afishaFilter .afisha-row__note { color: inherit; background: transparent; }

@media (max-width: 767px) {
    .specView #afishaFilter .afisha-row__layout { grid-template-columns: 1fr; }
}
