/* Custom fixes and enhancements */

/* Savior overlay styles */
.--savior-overlay-transform-reset {
    transform: none !important;
}

.--savior-overlay-transition-reset {
    transition: none !important;
}

.--savior-overlay-filter-reset {
    filter: none !important;
}

.--savior-overlay-z-index-reset {
    z-index: auto !important;
}

.--savior-overlay-position-reset {
    position: static !important;
}

.--savior-overlay-display-reset {
    display: block !important;
}

.--savior-overlay-overflow-reset {
    overflow: visible !important;
}

.--savior-overlay-transform-origin-reset {
    transform-origin: initial !important;
}

.--savior-overlay-text-align-reset {
    text-align: initial !important;
}

.--savior-overlay-background-reset {
    background: transparent !important;
}

.--savior-overlay-opacity-reset {
    opacity: 1 !important;
}

.--savior-overlay-min-height-reset {
    min-height: auto !important;
}

.--savior-overlay-min-width-reset {
    min-width: auto !important;
}

.--savior-overlay-max-height-reset {
    max-height: none !important;
}

.--savior-overlay-max-width-reset {
    max-width: none !important;
}

.--savior-overlay-left-reset {
    left: auto !important;
}

.--savior-overlay-right-reset {
    right: auto !important;
}

.--savior-overlay-top-reset {
    top: auto !important;
}

.--savior-overlay-bottom-reset {
    bottom: auto !important;
}

.--savior-overlay-border-reset {
    border: none !important;
}

.--savior-overlay-clear-reset {
    clear: none !important;
}

.--savior-overlay-cursor-reset {
    cursor: auto !important;
}

.--savior-overlay-direction-reset {
    direction: ltr !important;
}

.--savior-overlay-float-reset {
    float: none !important;
}

.--savior-overlay-font-style-reset {
    font-style: normal !important;
}

.--savior-overlay-font-weight-reset {
    font-weight: normal !important;
}

.--savior-overlay-letter-spacing-reset {
    letter-spacing: normal !important;
}

.--savior-overlay-line-height-reset {
    line-height: normal !important;
}

.--savior-overlay-margin-reset {
    margin: 0 !important;
}

.--savior-overlay-outline-reset {
    outline: none !important;
}

.--savior-overlay-padding-reset {
    padding: 0 !important;
}

.--savior-overlay-pointer-events-reset {
    pointer-events: auto !important;
}

.--savior-overlay-text-decoration-reset {
    text-decoration: none !important;
}

.--savior-overlay-text-indent-reset {
    text-indent: 0 !important;
}

.--savior-overlay-text-transform-reset {
    text-transform: none !important;
}

.--savior-overlay-visibility-reset {
    visibility: visible !important;
}

.--savior-overlay-white-space-reset {
    white-space: normal !important;
}

.--savior-overlay-word-spacing-reset {
    word-spacing: normal !important;
}

.--savior-overlay-vertical-align-reset {
    vertical-align: baseline !important;
}

.--savior-overlay-clip-reset {
    clip: auto !important;
}

.--savior-overlay-resize-reset {
    resize: none !important;
}

.--savior-overlay-box-shadow-reset {
    box-shadow: none !important;
}

.--savior-overlay-text-shadow-reset {
    text-shadow: none !important;
}

.--savior-overlay-table-layout-reset {
    table-layout: auto !important;
}

.--savior-overlay-animation-reset {
    animation: none !important;
}

.--savior-overlay-animation-delay-reset {
    animation-delay: 0s !important;
}

.--savior-overlay-animation-direction-reset {
    animation-direction: normal !important;
}

.--savior-overlay-animation-duration-reset {
    animation-duration: 0s !important;
}

.--savior-overlay-animation-fill-mode-reset {
    animation-fill-mode: none !important;
}

.--savior-overlay-animation-iteration-count-reset {
    animation-iteration-count: 1 !important;
}

.--savior-overlay-animation-name-reset {
    animation-name: none !important;
}

.--savior-overlay-animation-play-state-reset {
    animation-play-state: running !important;
}

.--savior-overlay-animation-timing-function-reset {
    animation-timing-function: ease !important;
}

.--savior-overlay-backface-visibility-reset {
    backface-visibility: visible !important;
}

.--savior-overlay-column-count-reset {
    column-count: auto !important;
}

.--savior-overlay-column-gap-reset {
    column-gap: normal !important;
}

.--savior-overlay-column-rule-reset {
    column-rule: medium none currentColor !important;
}

.--savior-overlay-column-span-reset {
    column-span: 1 !important;
}

.--savior-overlay-column-width-reset {
    column-width: auto !important;
}

.--savior-overlay-perspective-reset {
    perspective: none !important;
}

.--savior-overlay-perspective-origin-reset {
    perspective-origin: 50% 50% !important;
}

.--savior-overlay-transform-style-reset {
    transform-style: flat !important;
}

.--savior-overlay-transition-delay-reset {
    transition-delay: 0s !important;
}

.--savior-overlay-transition-duration-reset {
    transition-duration: 0s !important;
}

.--savior-overlay-transition-property-reset {
    transition-property: none !important;
}

.--savior-overlay-transition-timing-function-reset {
    transition-timing-function: ease !important;
}

.--savior-overlay-word-break-reset {
    word-break: normal !important;
}

.--savior-overlay-word-wrap-reset {
    word-wrap: normal !important;
}

.--savior-overlay-z-index-reset#mtLayer,
.--savior-overlay-z-index-reset.media-layer {
    z-index: 3000 !important;
}

.--savior-overlay-z-index-reset.centered#email-signup {
    z-index: 3000 !important;
}

.--savior-overlay-z-index-reset#tato-video-player {
    z-index: 3000 !important;
}

.--savior-overlay-z-index-reset.modal {
    z-index: 3000 !important;
}

.--savior-overlay-z-index-reset#livechat-compact-container {
    z-index: 3000 !important;
}

/* Overlay for ok.ru */
#vp_w.--savior-overlay-z-index-reset.media-layer.media-layer__video {
    overflow-y: hidden;
    z-index: 2147483643 !important;
}

.media-layer__video.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
    overflow-y: hidden
}

.okVideo.media-layer__video.media-layer.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
    overflow-y: hidden
}

#media-player.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

/* Overlay for youtube.com */
ytd-popup-container.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

tp-yt-paper-dialog.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

.--savior-overlay-z-index-reset.global-boundary {
    z-index: 2147483643 !important;
}

.--savior-overlay-z-index-reset > tp-yt-iron-overlay-backdrop {
    z-index: 2147483643 !important;
}

#webPlayerContainer.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

/* Overlay for facebook.com */
._n5.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

._4t2a.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

/* Overlay for twitter.com */
#react-root > div > div.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

/* Overlay for reddit.com */
.VideoPlayer.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

/* Overlay for dailymotion.com */
.player_overlay.--savior-overlay-z-index-reset {
    z-index: 2147483643 !important;
}

/* Rich Play styles */
.HMRichPlay {
    width: 350px;
    height: 280px;
}

/* Hover fix */
#hoverhisd:hover {
    top: inherit
}

.header-search input.zanpian-wd {
    color: #333 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    font-size: 14px !important;
    padding-left: 15px !important;
    padding-right: 120px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}

.header-search input.zanpian-wd::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.header-search input.zanpian-wd:focus {
    border-color: #589cf6 !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(88, 156, 246, 0.3) !important;
}

.header-search .search-submit {
    background: #28a745 !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.header-search .search-submit:hover {
    background: #218838 !important;
}

.header-search .search-submit .icon-sousuo {
    font-size: 18px !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    .headers-search .search-r .search-submit {
        display: none !important;
    }

    .headers-search .search-r .search-submit .icon-sousuo {
        display: none !important;
    }

    body.search-page .headers-search .search-r .search-submit .icon-sousuo,
    .search-keywords .search-submit .icon-sousuo {
        display: inline-block !important;
    }
    
    .search-keywords {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: #222328 !important;
        z-index: 99999 !important;
        padding: 0 !important;
        overflow-y: auto !important;
    }
    
    .search-keywords-t {
        background: #333 !important;
        padding: 15px !important;
        border-bottom: 1px solid #555 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 100000 !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .search-keywords-t .icon-left {
        color: #fff !important;
        font-size: 20px !important;
        margin-right: 15px !important;
        cursor: pointer !important;
    }
    
    .search-keywords-t form {
        display: flex !important;
        align-items: center !important;
        flex: 1 !important;
        gap: 0 !important;
        margin: 0 !important;
    }
    
    .search-keywords-t .zanpian-wd {
        flex: 1 !important;
        height: 44px !important;
        border: 1px solid #ddd !important;
        border-right: none !important;
        border-radius: 22px 0 0 22px !important;
        padding: 0 15px !important;
        font-size: 16px !important;
        line-height: 22px !important;
        color: #333 !important;
        background: #fff !important;
        outline: none !important;
        box-sizing: border-box !important;
        vertical-align: middle !important;
    }
    
    .search-keywords-t .zanpian-wd::placeholder {
        color: #999 !important;
    }
    
    .search-keywords-t .search-submit {
        height: 44px !important;
        width: 120px !important;
        background: #28a745 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 0 22px 22px 0 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        vertical-align: middle !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 5px !important;
    }
    
    .search-keywords-t .search-submit:active {
        background: #218838 !important;
    }
    .search-keywords-t .search-submit .icon-sousuo {
        font-size: 18px !important;
        color: #fff !important;
        display: inline-block !important;
        line-height: 1 !important;
    }
    .search-keywords-t .search-submit span:not(.iconfont) {
        font-size: 14px !important;
        color: #fff !important;
        display: inline-block !important;
        line-height: 1 !important;
        font-weight: normal !important;
    }
    
    .search-keywords .dropdown-box {
        background: #222328 !important;
        margin: 0 !important;
        padding: 20px !important;
        min-height: calc(100vh - 70px) !important;
        color: #ccc !important;
    }
    
    .search-keywords .dropdown-box .text-muted {
        color: #999 !important;
    }
    
    .search-keywords .dropdown-box a {
        color: #ccc !important;
    }
    
    .search-keywords .dropdown-box a:hover {
        color: #589cf6 !important;
    }
}
