/*
 * Final profile layout fixes layered over profile-modern.css.
 * Kept separate so the complete profile redesign can be rolled back safely.
 */

body:has(#profile) .main_header {
    position: relative !important;
    z-index: 120;
    height: auto;
    min-height: 94px;
    padding: 0 !important;
    background: rgba(8, 8, 11, 0.88);
    border-bottom: 1px solid var(--profile-line);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

body:has(#profile) .main_header > .container,
body:has(#profile) > nav > .container,
body:has(#profile) footer > .container,
body:has(#profile) #copyright > .container {
    width: min(1240px, calc(100% - 48px));
    max-width: 1240px;
}

body:has(#profile) .main_header .row {
    display: flex;
    align-items: center;
    min-height: 94px;
}

body:has(#profile) .main_header .logo {
    display: flex;
    align-items: center;
    height: auto;
    margin: 0;
}

body:has(#profile) .main_header .logo img {
    display: block;
    width: 218px;
    max-width: 100%;
    height: auto;
}

body:has(#profile) .main_header #search_key {
    width: 100%;
    height: 44px;
    padding: 0 52px 0 17px;
    color: var(--profile-text);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--profile-line-strong);
    border-radius: 12px;
    outline: none;
}

body:has(#profile) .main_header #serch_submit {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 36px;
    height: 36px !important;
    background-color: var(--profile-pink);
    border: 0;
    border-radius: 9px;
    opacity: 1;
}

@media (min-width: 992px) {
    #profile > .container > .row.profile_block:not(.visible-xs):not(.visible-sm) > #gallery_mobile {
        grid-row: 1;
        grid-column: 1;
    }

    #profile > .container > .row.profile_block:not(.visible-xs):not(.visible-sm) > .col-md-4 {
        grid-row: 1;
        grid-column: 2;
    }
}

#profile #super-slider .super-slider-slide {
    flex: 0 0 auto;
    width: auto;
}

#profile #super-slider .super-slider-slide-content {
    width: auto;
}

#profile #super-slider .super-slider-slide-content-image {
    width: auto;
    min-width: 0;
    max-width: none;
    height: 430px;
    min-height: 430px;
    object-fit: cover;
}

#profile .jquery-comments .textarea-wrapper {
    background: transparent;
    border: 0;
}

#profile .jquery-comments .textarea-wrapper .textarea {
    min-height: 42px;
    padding: 10px 12px;
    color: var(--profile-text);
    background: var(--profile-control);
    border: 1px solid var(--profile-line-strong);
    border-radius: 10px;
    outline: none;
}

#profile .jquery-comments .textarea-wrapper .textarea:focus {
    border-color: rgba(255, 47, 146, 0.66);
    box-shadow: 0 0 0 3px rgba(255, 47, 146, 0.1);
}

#profile .jquery-comments .textarea-wrapper::before {
    border-right-color: var(--profile-line-strong);
}

#profile .jquery-comments .textarea-wrapper::after {
    border-right-color: var(--profile-control);
}

body:has(#profile) #like {
    margin: 0;
    color: var(--profile-text);
    background: #0b0b10;
}

body:has(#profile) #like:not(:has(img)) {
    display: none;
}

body:has(#profile) footer {
    position: relative;
    padding: 42px 0 0;
    background:
        radial-gradient(circle at 15% 0, rgba(255, 47, 146, 0.075), transparent 24rem),
        #0c0c11;
    border-top: 1px solid var(--profile-line);
}

body:has(#profile) footer > .container {
    display: flex;
    gap: 32px;
    align-items: center;
    min-height: 84px;
    padding-bottom: 35px;
}

body:has(#profile) footer .link ul {
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
}

body:has(#profile) footer .link li {
    list-style: none;
}

body:has(#profile) footer .link a {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 650;
    color: #aaa5af;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

body:has(#profile) footer .pull-right {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: auto;
}

body:has(#profile) footer #copyright {
    padding: 15px 0;
    color: #696570;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.045);
}

@media (max-width: 991px) {
    body:has(#profile) .main_header {
        min-height: 70px;
    }

    body:has(#profile) .main_header > .container,
    body:has(#profile) footer > .container,
    body:has(#profile) #copyright > .container {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }

    body:has(#profile) .main_header .row {
        position: relative;
        min-height: 70px;
    }

    body:has(#profile) .main_header .row > div:first-child {
        width: 100%;
    }

    body:has(#profile) .main_header .logo {
        justify-content: center;
    }

    body:has(#profile) .main_header .logo img {
        width: 142px;
    }

    body:has(#profile) #nav-icon1 {
        top: 25px;
        left: 16px;
        margin: 0;
    }

    body:has(#profile) .mobile_top_heart {
        top: 18px;
        right: 10px;
    }

    body:has(#profile) .navig {
        top: 0;
    }

    body:has(#profile) .navig .navigationQ {
        display: grid;
        grid-template-columns: minmax(72px, 0.9fr) minmax(138px, 1.25fr) minmax(72px, 0.9fr);
        gap: 6px;
        align-items: center;
    }

    body:has(#profile) .navig .prev-next-back-fav-block {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        width: 100%;
    }

    body:has(#profile) .navig .prev,
    body:has(#profile) .navig .next,
    body:has(#profile) .navig .favorite,
    body:has(#profile) .navig .prev-next-back-fav-block .prev,
    body:has(#profile) .navig .prev-next-back-fav-block .favorite {
        width: 100%;
        min-width: 0;
    }

    #profile #super-slider .super-slider-slide-content-image {
        height: 360px;
        min-height: 360px;
    }

    body:has(#profile) footer > .container {
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 26px;
        text-align: center;
    }

    body:has(#profile) footer .pull-right {
        justify-content: center;
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    body:has(#profile) .navig .followers {
        display: none;
    }

    #profile #super-slider .super-slider-slide-content-image {
        height: 310px;
        min-height: 310px;
    }

    body:has(#profile) footer > .container {
        flex-direction: column;
        gap: 19px;
    }
}

@media (max-width: 390px) {
    body:has(#profile) .navig .navigationQ {
        grid-template-columns: 58px minmax(134px, 1fr) 58px;
    }

    body:has(#profile) .navig .navigationQ > .prev:first-child,
    body:has(#profile) .navig .navigationQ > .next:last-child {
        font-size: 0;
    }

    #profile #super-slider .super-slider-slide-content-image {
        height: 280px;
        min-height: 280px;
    }
}
