/* ==========================================================================
   ACTUAL NOW
   ========================================================================== */

.afxActual {
    width: 100%;
    margin: 18px 0;
    overflow: hidden;
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.afxActual-header {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 9px;
}


.afxActual-heading {
    margin: 0;

    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.2;
}


/* ==========================================================================
   ADMIN BUTTON
   ========================================================================== */

.afxActual-adminInlineButton {
    display: inline-flex;
    align-items: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: #999;

    font-size: 11px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}


.afxActual-adminInlineButton:hover,
.afxActual-adminInlineButton.is-active {
    color: #4b25e5;
}


/* ==========================================================================
   ADMIN PANEL

   ВАЖНО:
   display:none стоит СРАЗУ.

   Поэтому если в localStorage панель была закрыта,
   браузер не успеет показать её до выполнения JS.
   ========================================================================== */

.afxActual-adminPanel {
    display: none;

    margin-bottom: 12px;

    padding: 10px 12px;

    border: 1px solid #dedede;
    border-radius: 10px;

    background: #f8f8f8;
}


.afxActual-adminPanel.is-open {
    display: block;
}


.afxActual-adminForm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;
}


.afxActual-adminForm label {
    margin: 0;

    font-size: 13px;
    font-weight: 600;
}


.afxActual-dateInput {
    height: 32px;

    padding: 3px 7px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: #fff;

    font-size: 13px;
}


.afxActual-adminButton {
    display: inline-flex;
    align-items: center;

    min-height: 32px;

    padding: 5px 9px;

    border: 1px solid #d2d2d2;
    border-radius: 6px;

    background: #fff;

    color: #333 !important;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none !important;

    cursor: pointer;
}


.afxActual-adminButton:hover {
    background: #eee;
}


.afxActual-adminStatus {
    margin-top: 8px;

    font-size: 12px;
    line-height: 1.5;

    color: #666;
}


.afxActual-adminPreview {
    color: #b05a00;
    font-weight: 600;
}


.afxActual-adminSuccess {
    color: #16833b;
    font-weight: 600;
}


.afxActual-adminError {
    color: #c62828;
    font-weight: 600;
}


.afxActual-debugTerms {
    margin-top: 8px;
    padding-top: 7px;

    border-top: 1px solid #e5e5e5;
}


.afxActual-debugTermsTitle {
    margin-bottom: 5px;

    font-weight: 600;
}


.afxActual-debugTerm {
    display: inline-block;

    margin:
        0 4px 4px 0;

    padding:
        2px 6px;

    border: 1px solid #e6e6e6;
    border-radius: 6px;

    background: #fff;

    color: #555;

    font-size: 11px;
}


.afxActual-debugTerm.strong {
    border-color: #d9d2ff;

    color: #4b25e5;
}


/* ==========================================================================
   EVENT BADGES
   ========================================================================== */

.afxActual-topics {
    display: flex;
    align-items: center;

    gap: 5px;

    margin-bottom: 9px;

    overflow-x: auto;

    scrollbar-width: none;
}


.afxActual-topics::-webkit-scrollbar {
    display: none;
}


.afxActual-topic {
    flex: 0 0 auto;

    padding: 4px 8px;

    /*
     * Белый бейдж + почти незаметная рамка
     */
    border: 1px solid rgba(0, 0, 0, .065);
    border-radius: 999px;

    background: #fff;

    color: #555 !important;

    font-size: 12px;
    font-weight: 500;

    white-space: nowrap;

    text-decoration: none !important;
}


.afxActual-topic:hover {
    border-color: rgba(0, 0, 0, .12);

    color: #222 !important;
}


/* ==========================================================================
   SLIDER
   ========================================================================== */

.afxActual-slider {
    position: relative;
}


.afxActual-viewport {
    overflow: hidden;
}


.afxActual-track {
    display: flex;

    gap: 12px;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    /*
     * ВАЖНО:
     *
     * scroll-snap убран.
     *
     * Раньше одновременно работали:
     *
     * smooth scroll
     * +
     * CSS scroll snap
     *
     * и браузер иногда пытался
     * скорректировать позицию обратно.
     *
     * Отсюда было подёргивание.
     */
    scroll-snap-type: none;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;
}


.afxActual-track::-webkit-scrollbar {
    display: none;
}


/* ==========================================================================
   CARD
   ========================================================================== */

.afxActual-card {
    display: flex;

    flex:
        0 0
        calc(
            (100% - 12px) / 2
        );

    min-width: 0;

    padding: 10px;

    /*
     * Обводки нет
     */
    border: 0;

    background: #fff;

    box-shadow: none;

    transform: none;
}


.afxActual-card:hover {
    box-shadow: none;

    transform: none;
}


/* ==========================================================================
   IMAGE
   ========================================================================== */

.afxActual-cardImageWrap {
    width: 38%;
    max-width: 170px;

    flex: 0 0 auto;
}


.afxActual-cardImageWrap > a {
    display: block;

    width: 100%;

    aspect-ratio: 1 / 1;
}


.afxActual-cardImage {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 20px;
}


/* ==========================================================================
   CONTENT
   ========================================================================== */

.afxActual-cardContent {
    flex: 1 1 auto;

    min-width: 0;

    padding-left: 12px;
}


/* ==========================================================================
   CATEGORY
   ========================================================================== */

.afxActual-title {
    display: block;

    width: 100%;

    margin: 0 0 4px;

    overflow: hidden;

    color: #111 !important;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;

    white-space: nowrap;
    text-overflow: ellipsis;

    text-decoration: none !important;
}


.afxActual-title:hover {
    text-decoration: underline !important;
}


/* ==========================================================================
   SOUND COUNT
   ========================================================================== */

.afxActual-count {
    margin-bottom: 9px;
}


/* ==========================================================================
   PLAYERS
   ========================================================================== */

.afxActual-sounds {
    display: flex;
    flex-direction: column;

    gap: 5px;
}


.afxActual-miniPlayer {
    display: flex;
    align-items: center;

    min-width: 0;
}


.afxActual-miniPlayer .miniPlay {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    cursor: pointer;
}


.afxActual-soundName {
    display: block;

    min-width: 0;

    overflow: hidden;

    color: #4b25e5 !important;

    font-size: inherit;
    font-weight: 400;
    line-height: inherit;

    white-space: nowrap;
    text-overflow: ellipsis;

    text-decoration: none !important;
}


.afxActual-soundName:hover {
    text-decoration: underline !important;
}


/* ==========================================================================
   MORE
   ========================================================================== */

.afxActual-more {
    margin-top: 8px;

    font-size: 14px;
    font-weight: 500;
}


.afxActual-more a {
    color: #4b25e5;

    text-decoration: none;
}


.afxActual-more a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   ARROWS
   ========================================================================== */

.afxActual-arrow {
    position: absolute;

    z-index: 10;

    top: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    margin-top: -19px;

    padding: 0;

    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 50%;

    background: rgba(255, 255, 255, .92);

    cursor: pointer;

    opacity: 0;

    box-shadow: none;

    transition: opacity .15s ease;
}


.afxActual-slider:hover
.afxActual-arrow {
    opacity: 1;
}


.afxActual-arrow img {
    display: block;

    width: 18px;
    height: 18px;
}


.afxActual-prev {
    left: 6px;
}


.afxActual-next {
    right: 6px;
}


/* ==========================================================================
   PAGINATION
   ========================================================================== */

.afxActual-indicators {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 3px;

    width: 100%;
    height: 8px;

    margin-top: 5px;

    /*
     * Весь индикатор немного прозрачный
     */
    opacity: .5;
}


.afxActual-indicator {
    display: block;

    width: 15px;
    height: 3px;

    flex: 0 0 auto;

    padding: 0;

    border: 0;
    border-radius: 2px;

    background: #aaa;

    cursor: pointer;

    /*
     * Никакой анимации ширины.
     * Поэтому ничего визуально
     * не подпрыгивает.
     */
    transition: none;
}


.afxActual-indicator.active {
    width: 24px;

    background: #4b25e5;
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 767px) {

    .afxActual {
        margin: 15px 0;
    }


    .afxActual-heading {
        font-size: 1.15rem;
    }


    .afxActual-card {
        flex-basis: 100%;

        padding: 8px;
    }


    .afxActual-cardImageWrap {
        width: 39%;
        max-width: none;
    }


    .afxActual-cardContent {
        padding-left: 10px;
    }


    .afxActual-arrow {
        display: none !important;
    }


    .afxActual-adminPanel {
        padding: 8px;
    }

}