:root {
    --sidebar-w: 160px;
    --track-h: 52px;
    --ruler-h: 32px;
    --header-h: 42px;
    --z-index-actions-dropdown: 1;
}

@media (max-width: 600px) {
    :root {
        --sidebar-w: 80px;
        --track-h: 48px;
        --ruler-h: 28px;
        --header-h: 38px;
    }

    .song-track-poster-switcher {
        display: block !important;
    }
}

.header-menu-profile2 {
    opacity: 0 !important;
}

.is-active2 {
    opacity: 1 !important;
}

.vs-tabs__tab-panel:not(.is-active) {
    display: none;
}

.vs-tabs__content {
    margin-top: 1rem;
}

.separ-audio-preloader {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-block: 40px;
}

.pre-line {
    white-space: pre-line;
}

.music {
    .button-back {
        position: relative;
        z-index: 1;
    }
}

.music-spectrum-text {
    &:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }
}

.modal-ci-container .modal-close,
.modal-close {
    z-index: 1;
}

.song-mastering-main {
    .music-spectrum-selection {
        border-radius: 0;
    }

    .music-spectrum-selection,
    .music-spectrum-crop {
        pointer-events: auto;
    }

    .music-spectrum-crop {
        z-index: 1;
    }
}

.modal-prompt {

    .music-field-prompt-container,
    .music-field-prompt {
        height: 100%;
    }

    .music-field-prompt-main {
        display: flex;
        flex-direction: column;
    }

    .modal-prompt-textarea {
        height: auto;
        flex-grow: 1;
    }
}

.music-spectrum--loading {
    background-color: #1f1f21;

    .music-spectrum-preloading {
        display: block;
    }

    svg,
    .music-spectrum-crop {
        visibility: hidden;
    }
}

.music-spectrum-preloading {
    position: absolute;
    display: none;
}

.song-mastering-bottom {
    .select-dropdown {
        top: auto;
        bottom: calc(100% + 8px);
    }
}

.main.video--editor-page {
    .video-form {
        display: none;
    }

    .video-center-container,
    .video-center,
    .video-bottom {
        display: flex;
        flex-direction: column;
    }

    .video-center {
        max-height: calc(100% - 50px);
    }

    .video-center-container {
        align-items: center;
    }

    .video-bottom,
    .video-bottom-overflow,
    .video-center-container,
    .video-player-editor {
        flex-grow: 1;
    }

    .video-player-editor {
        height: auto;
    }

    .video-bottom {
        width: auto;
        padding: 0;
        margin: 0;

        background-color: var(--black, #101012);
    }

    .video-bottom-overflow {
        position: absolute;
        left: 0;
        top: 0;
        width: calc(100% + 32px);
        height: calc(100% - 24px);

        margin-left: -16px;
        padding-inline: 16px;
        margin-top: 24px;
    }

    .timeline-fixed {
        position: sticky;
        top: 0;
        background-color: var(--black);
    }

    .video-editor-tracks-addtrack {
        height: auto;
        border-radius: 100px;
    }

    /* ========== RULER ========== */

    .ruler-row {
        display: flex;
        flex-shrink: 0;
        height: var(--ruler-h);
        background-color: #0f0f1a;
        border-bottom: 1px solid #2a2a3e;
    }

    .ruler-sidebar {
        width: var(--sidebar-w);
        min-width: var(--sidebar-w);
        background: #0f0f1a;
        border-right: 1px solid #2a2a3e;
    }

    .ruler-canvas-wrap {
        flex: 1;
        overflow: hidden;
        position: relative;
    }

    .ruler-canvas-wrap canvas {
        display: block;
    }

    /* ========== TRACKS AREA ========== */

    .tracks-area {
        flex: 1;
        display: flex;
        overflow: hidden;
    }

    .tracks-sidebar {
        width: var(--sidebar-w);
        min-width: var(--sidebar-w);
        background: #0f0f1a;
        border-right: 1px solid #2a2a3e;
        overflow-y: auto;
        overflow-x: hidden;

        .track-label {
            display: flex;
            align-items: center;
            height: var(--track-h);
            padding: 0 8px;
            gap: 6px;

            border-bottom: 1px solid #1e1e34;
            cursor: default;
            transition: background 0.15s;
        }

        .track-label:hover {
            background: #1a1a30;
        }

        .track-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;

            font-size: 10px;
            font-weight: 700;

            flex-shrink: 0;
            border-radius: 4px;
        }

        .track-icon {
            --_clr-track-icon: var(--clr-track-icon, #5b4fe6);

            background-color: var(--_clr-track-icon);
            color: #fff;
        }

        .track-icon.video {
            --clr-track-icon: #5b4fe6;
        }

        .track-icon.image {
            --clr-track-icon: #1fa85e;
        }

        .track-icon.audio {
            --clr-track-icon: #e6a817;
        }

        .track-icon.text {
            --clr-track-icon: #e05a8a;
        }

        .track-name {
            display: block;
            flex-grow: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-height: unset;
            font-size: 12px;
            color: #bbb;
        }
    }

    .tracks-sidebar::-webkit-scrollbar {
        width: 0;
    }

    .tracks-canvas-wrap {
        flex: 1;
        position: relative;
        overflow: hidden;
    }

    .tracks-canvas-wrap canvas {
        display: block;
    }

    /* ========== SCROLLBAR ROW ========== */

    .hscroll-row {
        display: flex;
        height: 14px;
        flex-shrink: 0;
        background: #0f0f1a;
        border-top: 1px solid #2a2a3e;
    }

    .hscroll-spacer {
        width: var(--sidebar-w);
        min-width: var(--sidebar-w);
    }

    .hscroll-track {
        flex: 1;
        position: relative;
        cursor: pointer;
    }

    .hscroll-thumb {
        position: absolute;
        top: 2px;
        height: 10px;
        background: #3a3a5a;
        border-radius: 5px;
        min-width: 30px;
        cursor: grab;
        transition: background 0.15s;
    }

    .hscroll-thumb:hover,
    .hscroll-thumb.active {
        background: #5a5a8a;
    }

    @media (max-width: 600px) {
        .hscroll-row {
            height: 18px;
        }

        .hscroll-thumb {
            top: 3px;
            height: 12px;
            min-width: 40px;
        }
    }

    /* ========== TOOLTIP ========== */

    .clip-tooltip {
        position: fixed;
        background: #222240;
        color: #ddd;
        padding: 6px 10px;
        border-radius: 5px;
        font-size: 11px;
        pointer-events: none;
        white-space: nowrap;
        border: 1px solid #3a3a5e;
        z-index: 100;
        display: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    @media (max-width: 600px) {
        .clip-tooltip {
            display: none !important;
        }
    }

    /* ========== DRAG TIME BADGE ========== */

    .drag-badge {
        position: fixed;
        background: rgba(20, 20, 40, 0.95);
        color: #fff;
        padding: 5px 10px;
        border-radius: 6px;
        font-size: 11px;
        font-family: "Consolas", "Courier New", monospace;
        pointer-events: none;
        white-space: nowrap;
        border: 1px solid #5b4fe6;
        z-index: 120;
        display: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
        line-height: 1.5;
    }

    /* ========== PINCH INDICATOR ========== */

    .pinch-indicator {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(91, 79, 230, 0.9);
        color: #fff;
        padding: 10px 20px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        pointer-events: none;
        z-index: 200;
        display: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        transition: opacity 0.2s;
    }

    /* ========== SELECTION BAR ========== */

    .selection-bar {
        display: none;
        height: 36px;
        background: #1e1e38;
        border-top: 1px solid #2a2a3e;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 0 10px;
        font-size: 11px;
        color: #bbb;
        flex-shrink: 0;
    }

    .selection-bar.visible {
        display: flex;
    }

    .selection-bar .sel-name {
        color: #e0ddff;
        font-weight: 600;
    }

    .selection-bar .sel-time {
        font-family: "Consolas", monospace;
        color: #7c5bf5;
    }

    @media (max-width: 600px) {
        .selection-bar.visible {
            display: flex;
        }
    }


    .dropdown--context {
        position: fixed;
    }

    .is-dropdown-visible {
        display: block;
        visibility: visible;
        z-index: var(--z-index-actions-dropdown);
        opacity: 1;
    }

    .video-settings-editor-dropdown-wrapper {
        position: relative;
    }

    .video-settings-editor-dropdown-wrapper,
    .video-settings-editor-replace-wrapper,
    .video-editor-tracks-addtrack-wrapper {
        .dropdown {
            display: none;
        }

        .dropdown-item {
            text-align: left;
        }
    }

    .video-settings-editor-dropdown-wrapper.is-active-dropdown,
    .video-settings-editor-replace-wrapper.is-active-dropdown {
        .dropdown {
            display: flex;
            visibility: visible;
            opacity: 1;
            z-index: 1;
            left: 50%;
            translate: -50% 0;
            top: auto;
            margin-top: 8px;
        }
    }

    .video-editor-tracks-addtrack-wrapper.is-active-dropdown {
        position: relative;

        .dropdown {
            display: flex;
            width: 204px;
            top: 50%;
            left: 50%;
            visibility: visible;
            opacity: 1;
            z-index: 1;
        }
    }

    .video-settings-editor-photos-list {

        .modalwindow,
        .form_center {
            display: none;
        }
    }

    .video-settings-editor-tracks-list .icon-spinner {
        animation: video-loader-spin 1s linear infinite;
    }

    .dropdown-input {
        display: block;
        width: 100%;
    }

    .preview-container {
        position: relative;
        overflow: hidden;

        width: 100%;
        height: 100%;

        background: #000;
        min-height: 100px;
    }

    .preview-layer {
        position: absolute;
        width: 100%;
        height: 100%;

        pointer-events: none;

        will-change: transform, opacity;
    }

    .video-center-bottom {
        justify-content: center;
    }
}

.rs-slider {
    position: relative;
    height: 24px;
    user-select: none;
    margin-inline: 8px;
}

.rs-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    background: #3d3d3d;
    border-radius: 2px;
}

.rs-fill {
    position: absolute;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    background: #5d8eff;
    border-radius: 2px;
}

.rs-thumb {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.rs-tooltip {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

.rs-slider-tooltip {
    margin-top: 24px;
}

.form-input-wrapper {
    --_input-width: var(--input-width, 100%);

    display: flex;
    align-items: center;
    position: relative;
    width: var(--_input-width);
    height: 36px;
    padding: 6px 20px;
    border-radius: 100px;
    background-color: var(--grey-4);
}

.form-input-wrapper--100 {
    --input-width: 100px;
}

.linear-fields {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.mb-sm {
    margin-bottom: 0.25em;
}

.mb-md {
    margin-bottom: 0.5em;
}

.timing-form-changeable {
    display: none;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.video--editor-page {
    .main-library--video-editor {
        flex-grow: 1!important;
        max-width: 100%!important;
    }
}

@media (max-width: 1536px) {
    .nicname {
        display: none;
    }
}

@media (min-width: 1366px) {
}

@media (min-width: 575px) {
    .sp-slide .song-roads .music-part {
        width: calc((100% - 16px) / 2);
    }
}

@media (min-width: 1536px) {
    .music-part .dropdown {
        transform: translate(calc(-100% - 46px), 0px);
    }
}

.main-form-buttons {
    margin-bottom: 130px !important;
}

.music-sidebar-texts-col .t16 {
    margin-bottom: 130px !important;
}

@media (max-width: 1024px) {

    .player-progress {
        height: 20px !important;
    }

    .player-close {
        z-index: 1000 !important;
    }

}

@media (max-width: 575px) {
    .main-form-buttons {
        margin-bottom: 10px !important;
    }

    .music-sidebar-texts-col .t16 {
        margin-bottom: 10px !important;
    }
}

.music-library-list {
    min-height: 600px !important;
}

.modal {
    .modal-backdrop {
        display: none!important;
    }

    .main-library,
    .main.video {
        width: 100%;
        max-width: 100%;
    }

    .main-library {}

    .sp-my-compositions {
        height: 100%;
    }

    .selection-bar {
        display: none;

        &.is-open {
            display: block;
        }
    }

    &.modal--new-video {
        background-color: var(--color-bg-tertiary);
    }
}

/** стили со style.min.css */
.masonry-item-video {
    .masonry-item-video__topleft {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        position: absolute;
        top: 8px;
        left: 8px;
        gap: 10px;
        z-index: 10;
    }

    .masonry-item-video__topright {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        position: absolute;
        top: 8px;
        right: 8px;
        gap: 10px;
        z-index: 10;
    }

    .masonry-item__action {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
    }
}