footer .footer-wrapper {
    display: block;
}

footer .footer-cta-section {
    position: relative;
}

footer .footer-cta-section::before,
footer .footer-cta-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 280px;
    height: 200px;
    background: no-repeat bottom / contain;
    pointer-events: none;
}

footer .footer-cta-section::before {
    left: 0;
    background-image: url("../images/footer-wave-left.svg");
}

footer .footer-cta-section::after {
    right: 0;
    background-image: url("../images/footer-wave-right.svg");
}

footer .footer-cta-section > .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 1199px) {
    footer .footer-cta-section::before,
    footer .footer-cta-section::after {
        display: none;
    }
}

footer .footer-cta {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 12px 0 24px;
}

footer .footer-cta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 1 460px;
    padding: 8px 40px;
}

footer .footer-cta-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

footer .footer-cta-item + .footer-cta-item {
    border-left: 1px solid #d5dde8;
}

footer .footer-cta-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #1a56e8;
}

footer .footer-cta-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

footer .footer-cta-body p {
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    margin: 0;
    max-width: 200px;
}

footer .footer-post-btn {
    display: inline-block;
    width: 100%;
    padding: 18px 24px;
    border-radius: 6px;
    background: #1a56e8;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    min-height: auto !important;
}

footer .footer-post-btn:hover {
    background: #1447c4;
    color: #fff;
}

footer .footer-country {
    position: relative;
    width: 100%;
}

footer .footer-country summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

footer .footer-country summary::-webkit-details-marker {
    display: none;
}

footer .footer-country summary::after {
    content: "";
    margin-left: auto;
    width: 6px;
    height: 6px;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg) translateY(-2px);
}

footer .footer-country[open] summary::after {
    transform: rotate(-135deg);
}

footer .footer-country img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 2px;
}

footer .footer-country ul {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 4px);
    z-index: 10;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

footer .footer-country ul a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 500;
}

footer .footer-country ul a:hover {
    background: #f2f6fb;
}

footer .footer-wrapper .footer-cms-list {
    justify-content: center;
    gap: 0;
    padding: 24px 0;
    margin-bottom: 0;
    border-top: 1px solid #dde4ee;
}

footer .footer-wrapper .footer-cms-list li {
    padding: 0 84px;
    text-align: center;
}

@media (max-width: 1400px) {
    footer .footer-wrapper .footer-cms-list li {
        padding: 0 48px;
    }
}

footer .footer-wrapper .footer-cms-list li + li {
    border-left: 1px solid #d5dde8;
}

footer .footer-wrapper .footer-cms-list li a {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 18px 24px;
    border-top: 1px solid #d5dde8;
}

footer .footer-rta {
    padding-right: 60px;
    border-right: 1px solid #d5dde8;
    display: inline-flex;
}

footer .footer-rta img {
    display: block;
    width: 89px;
    height: auto;
    mix-blend-mode: multiply;
}

footer .footer-copy {
    margin: 0;
    padding-left: 60px;
    font-size: 13px;
    font-weight: 600;
}

@media screen and (max-width: 1023px) {
    footer .footer-wrapper .footer-cms-list {
        flex-direction: column;
        row-gap: 12px;
        padding: 16px 0;
    }

    footer .footer-wrapper .footer-cms-list li {
        flex: 0 1 auto;
        padding: 0 16px;
        text-align: left;
    }

    footer .footer-wrapper .footer-cms-list li + li {
        border-left: 0;
    }
}

@media screen and (max-width: 767px) {
    footer .footer-cta {
        flex-direction: column;
        align-items: center;
        padding-bottom: 12px;
    }

    footer .footer-cta-item {
        flex: none;
        width: 100%;
        max-width: 460px;
        padding: 24px 0;
    }

    footer .footer-cta-item + .footer-cta-item {
        border-left: 0;
        border-top: 1px solid #d5dde8;
    }

    footer .footer-wrapper .footer-cms-list {
        flex-direction: column;
        row-gap: 12px;
        padding: 16px 0;
    }

    footer .footer-wrapper .footer-cms-list li {
        flex: 0 1 auto;
        padding: 0 16px;
        text-align: left;
    }

    footer .footer-wrapper .footer-cms-list li + li {
        border-left: 0;
    }

    footer .footer-bottom {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    footer .footer-rta {
        padding-right: 0;
        border-right: 0;
    }

    footer .footer-copy {
        padding-left: 0;
        text-align: center;
    }
}

/* Profile detail "Contact Me" buttons: colours for contact types added on top of style.css (blue/green/yellow-colour) */
.listing-social-link .purple-colour,
.listing-social-link .telegram-colour {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.listing-social-link .purple-colour {
    background: #e53935;
}

.listing-social-link .telegram-colour {
    background: #2aabee;
}

/* Profile card contact buttons in listings: SMS button colour (other types are in stylev2new.css) */
.profile-card__contact--sms {
    background-color: #7b61ff;
}

/* Cookie consent banner (resources/views/partials/cookie-consent.blade.php): bottom bar, visuals taken from devrabiul/laravel-cookie-consent "bar" layout */
.cookie-banner-open body {
    height: auto !important;
    overflow: hidden !important;
}

.cookie-banner-open body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, .65);
}

.cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
    transition: bottom 1s ease-in-out, visibility 1s ease-in-out;
}

.cookie-banner--hidden {
    bottom: -150%;
    visibility: hidden;
}

.cookie-banner__container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.cookie-banner__title {
    margin: 0;
    padding: 0 0 .35rem;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.cookie-banner__description {
    margin: 0;
    font-size: 14px;
    color: var(--secondary-color);
    opacity: .8;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
}

.cookie-banner__button {
    min-width: max-content;
    padding: .5rem 1.25rem;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    color: #fff;
    background-color: var(--primary-color);
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .cookie-banner__button {
        flex: 1;
    }
}

@media (min-width: 576px) {
    .cookie-banner__container {
        max-width: 480px;
    }
}

@media (min-width: 768px) {
    .cookie-banner__container {
        max-width: 640px;
    }
}

@media (min-width: 992px) {
    .cookie-banner__container {
        max-width: 860px;
    }
}

@media (min-width: 1200px) {
    .cookie-banner__container {
        max-width: 1080px;
    }
}

@media (min-width: 1400px) {
    .cookie-banner__container {
        max-width: 1200px;
    }
}

/* Category page subtitle under H1: plain text, same font as H1 (.main-heading-cat), H2-like size */
.category-sec .category-content .category-subtitle {
    font-family: Inter;
    font-size: 24px;
    font-weight: 450;
    line-height: 32px;
    color: #212121;
}

@media screen and (max-width: 767px) {
    .category-sec .category-content .category-subtitle {
        font-size: 18px;
        line-height: 26px;
        font-weight: 400;
    }
}

/* Post add/edit form: 10px gap between Location/Title/Short bio/Description, stylev2 resets .form-group margin to 0 inside .ads-upload-data */
.ads-upload .ads-upload-data .form-group.form-group-setp {
    margin-bottom: 10px;
}

/* Post add/edit form: Short bio textarea a bit taller than the other fields (stylev2 .form-control min-height is 60px) */
.ads-upload .ads-upload-data #short_bio {
    min-height: 76px;
}

/* Post add/edit form: no divider line between Description and the tags block (main.css loads before stylev2 here, hence .ads-upload) */
.ads-upload .ads-upload-tags {
    border-top: none;
}

/* Profile detail page: H1 "{Name} {Age} in {City}" above the profile block, age and city in grey */
.listing-gallery .profile-heading {
    font-size: 32px;
    line-height: 40px;
    margin: 0 0 16px;
}

.listing-gallery .profile-heading__details {
    color: #8a8a8a;
}

@media screen and (max-width: 767px) {
    .listing-gallery .profile-heading {
        font-size: 24px;
        line-height: 30px;
    }
}

/* Reusable profile list card (ui.entity.profile.list-card): photo on the left; title, description and location on the right.
   Fixed 160px height: title is kept to one line, overflowing description is hidden */
.profile-list-card {
    display: flex;
    height: 160px;
    gap: 16px;
    overflow: hidden;
    border: 2.5px solid #3194fe;
    border-radius: 15px;
    box-shadow: -3px 6px 30px -3px #dddddd9e;
    text-decoration: none;
    background-color: #fff;
}

.profile-list-card__image {
    flex: 0 0 auto;
    width: auto;
    height: 100%;
    aspect-ratio: 320 / 420;
    object-fit: cover;
}

.profile-list-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding: 16px 16px 16px 0;
}

.profile-list-card__title {
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    color: #212121;
}

.profile-list-card__description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    min-height: 0;
    overflow: hidden;
    font-size: 16px;
    line-height: 22px;
    color: #212121;
}

.profile-list-card__location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 16px;
    line-height: 22px;
    color: #8a8a8a;
}

@media screen and (max-width: 767px) {
    .profile-list-card {
        gap: 12px;
    }

    .profile-list-card__body {
        padding: 12px 12px 12px 0;
    }

    .profile-list-card__description {
        font-size: 12px;
    }
}

/* Profile detail page: "Similar ads" block (ui.widget.similar-ads.default), 3 random ads from the same city and category */
.similar-ads {
    padding: 24px 0;
}

/* Same container width as .listing-gallery .container (stylev2.min.css / responsive.min.css) */
.similar-ads .container {
    max-width: 1400px;
    width: 80%;
}

@media screen and (min-width: 1300px) and (max-width: 1399px) {
    .similar-ads .container {
        width: 90%;
    }
}

@media screen and (max-width: 767px) {
    .similar-ads .container {
        width: 100%;
    }
}

.similar-ads .profile-block {
    margin-top: 0;
}

.similar-ads .profile-list-card {
    border: none;
}

.similar-ads__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Profile card in location listings: contacts on the right, "{Symbol}{Price}" minimum price in blue text
   always on the next row below them, on the left */
.profile-card__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.profile-card__footer .profile-card__contacts {
    order: -1;
    margin-top: 0;
    align-self: flex-end;
}

.profile-card__footer .profile-card__min-price {
    align-self: flex-start;
}

.profile-card__min-price {
    display: inline-block;
    color: #1a6fd1;
    font-size: 20px;
    font-weight: 700;
    line-height: 20px;
}

@media (max-width: 767px) {
    .profile-card__footer .profile-card__contacts {
        justify-content: flex-end;
    }
}

/* Profile card in location listings: description shown without the 3-line clamp (length is limited on the backend) */
.profile-card__right .profile-card__description {
    overflow-wrap: break-word;
    word-break: break-word;
    color: #000;
}

/* Profile card in location listings: title is clamped to 2 lines at every width */
.profile-card__right .profile-card__title {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

@media (max-width: 475px) {
    .profile-card__right .profile-card__description {
        font-size: 12px !important;
    }
}

/* Landing page "Top Cities" and "Browse by Region" blocks: bordered boxes, 6/4/2 per row with an incomplete last row centred, regions collapsed to 2 rows until "View all" is clicked */
.location-block {
    margin-top: 40px;
}

.location-block__heading {
    font-family: Inter;
    font-size: 28px;
    font-weight: 450;
    line-height: 36px;
    color: #212121;
    text-align: center;
    margin-bottom: 22px;
}

.location-grid {
    --location-grid-columns: 6;
    --location-grid-gap: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--location-grid-gap);
}

.location-grid__item {
    flex: 0 0 calc((100% - (var(--location-grid-columns) - 1) * var(--location-grid-gap)) / var(--location-grid-columns));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px;
    border: 1px solid #d3d3d3;
    border-radius: 10px;
    color: #212121;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
    transition: .3s;
}

.location-grid__item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.location-grid--collapsed .location-grid__item:nth-child(n + 13) {
    display: none;
}

.location-block__more {
    margin-top: 20px;
    text-align: center;
}

.location-block__more-btn {
    padding: 10px 24px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    background: transparent;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
    transition: .3s;
}

.location-block__more-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

@media screen and (max-width: 991px) {
    .location-grid {
        --location-grid-columns: 4;
    }
}

@media screen and (max-width: 767px) {
    .location-block__heading {
        font-size: 22px;
        line-height: 30px;
    }

    .location-grid {
        --location-grid-columns: 2;
        --location-grid-gap: 12px;
    }
}

/* Profile detail page: grey page background with white content blocks (Personal details, Services, Caters To, Place of service, Price); heading icons (ui.shared.icon.*) are blue in a light-blue circle, matching the footer CTA icons */
body.profile-page {
    background-color: #f4f5f7;
}

body.profile-page footer {
    background-color: #f4f5f7;
    border-top: 1px solid #e3e3e3;
}

.profile-page .listing-gallery1 {
    padding-bottom: 24px;
}

/* Sticky "Contact Me" bar: inner padding and a top shadow so it doesn't merge with the blocks above and below */
.profile-page .listing-gallery2 {
    padding: 12px 0;
    border-top: 1px solid #e3e3e3;
    border-bottom: 1px solid #e3e3e3;
}

.profile-page .listing-gallery3 {
    padding-top: 24px;
}

.profile-page .listing-gallery-inner,
.profile-block {
    background-color: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
}

.profile-block {
    margin-top: 16px;
    padding: 24px 35px;
}

.profile-block .profile-block__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    color: #212121;
}

.profile-block__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #eaf1f8;
    color: #1a56e8;
}

.profile-block__icon svg {
    width: 22px;
    height: 22px;
}

.profile-block__tag {
    background-color: #eaf1f8;
    border-radius: 6px;
    padding: 7px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #212121;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    margin: 0;
}

.profile-details__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.profile-details__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #212121;
}

.profile-details .profile-details__label {
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
    color: #212121;
}

.profile-details .profile-details__value {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #000;
}

@media screen and (max-width: 767px) {
    .profile-block {
        padding: 16px;
    }

    .profile-details {
        gap: 16px;
    }
}

/* Profile detail "Contact Me" block under the gallery: up to 5 buttons in one row sharing the full width, icon next to the label on desktop and above it on mobile.
   main.css loads before stylev2/responsive here, hence the extra .listing-gallery specificity and !important for .icon-btn */
.listing-gallery .contact-me .listing-gallery-content-right {
    width: 100%;
}

.listing-gallery .contact-me .listing-gallery-content-right .listing-social-link {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.listing-gallery .contact-me .listing-gallery-content-right .listing-social-link h6 {
    flex: 0 0 100%;
    margin-bottom: 12px;
    text-align: center;
}

.listing-gallery .contact-me .listing-gallery-content-right .listing-social-link a {
    flex: 1 1 0;
    flex-direction: row;
    gap: 6px !important;
    width: auto;
    min-width: 0 !important;
    padding: 8px 4px;
}

/* stylev2 colours every span with --secondary-color, keep the button's white text instead */
.listing-gallery .contact-me .listing-social-link .profile-contact__title,
.listing-gallery .contact-me .listing-social-link .profile-contact__short-title,
.listing-gallery .contact-me .listing-social-link .profile-contact__number,
.listing-gallery .contact-me .listing-social-link .profile-contact__call-title {
    color: inherit;
}

/* Call button shows the phone number on desktop and "Call" on mobile */
.listing-gallery .contact-me .listing-social-link .profile-contact__call-title {
    display: none;
}

@media screen and (max-width: 767px) {
    /* icon above the label on mobile, side by side on desktop */
    .listing-gallery .contact-me .listing-gallery-content-right .listing-social-link a {
        flex-direction: column;
    }

    .listing-gallery .contact-me .listing-social-link .profile-contact__number {
        display: none;
    }

    .listing-gallery .contact-me .listing-social-link .profile-contact__call-title {
        display: inline;
    }
}

.listing-gallery .contact-me .listing-social-link .profile-contact__short-title {
    display: none;
}

@media screen and (max-width: 640px) {
    .listing-gallery .contact-me .listing-gallery-content-right .listing-social-link a {
        font-size: 12px !important;
    }
}

/* "WhatsApp" doesn't fit a fifth of the row on small phones, show "WA" instead */
@media screen and (max-width: 475px) {
    .listing-gallery .contact-me .listing-social-link .profile-contact__title {
        display: none;
    }

    .listing-gallery .contact-me .listing-social-link .profile-contact__short-title {
        display: inline;
    }
}
