/* =========================================================
   PAC ADS
   ISOLATED BODY-LEVEL POPUP
========================================================= */

#pacListingAd,
#pacListingAd * {
    box-sizing: border-box;
}


/* =========================================================
   BODY LOCK
========================================================= */

body.pac-ad-open {
    overflow: hidden !important;
    touch-action: none;
}


/* =========================================================
   OVERLAY
========================================================= */

#pacListingAd.pac-ad-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    display: flex;

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

    padding:
        max(14px, env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        max(14px, env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));

    background:
        rgba(4, 10, 18, .82);

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

    z-index: 2147483647;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    overflow: hidden;

    isolation: isolate;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}


/* =========================================================
   ACTIVE
========================================================= */

#pacListingAd.pac-ad-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   CONTAINER
========================================================= */

#pacListingAd .pac-ad-container {
    position: relative;

    display: flex;
    flex-direction: column;

    width: min(560px, 100%);
    max-width: 560px;

    max-height:
        calc(100vh - 28px);

    max-height:
        calc(100dvh - 28px);

    min-width: 0;
    min-height: 0;

    background: #fff;

    border-radius: 24px;

    overflow: hidden;

    box-shadow:
        0 35px 100px rgba(0,0,0,.40),
        0 10px 35px rgba(0,0,0,.20);

    transform:
        translateY(24px)
        scale(.97);

    opacity: 0;

    transition:
        transform .4s cubic-bezier(.2,.8,.2,1),
        opacity .3s ease;
}


/* =========================================================
   ACTIVE CONTAINER
========================================================= */

#pacListingAd.active .pac-ad-container {
    transform:
        translateY(0)
        scale(1);

    opacity: 1;
}


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

#pacListingAd .pac-ad-image {
    position: relative;

    width: 100%;

    height:
        clamp(180px, 38vh, 330px);

    min-height: 160px;
    max-height: 330px;

    flex: 0 0 auto;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #eef3f7,
            #dfe6ed
        );
}


#pacListingAd .pac-ad-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    margin: 0;
    padding: 0;
    border: 0;

    transition:
        transform .6s ease;
}


#pacListingAd .pac-ad-container:hover
.pac-ad-image img {
    transform: scale(1.035);
}


/* =========================================================
   PLACEHOLDER
========================================================= */

#pacListingAd .pac-ad-placeholder {
    width: 100%;
    height: 100%;

    display: flex;

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

    background:
        linear-gradient(
            135deg,
            #e8f5ee,
            #f4f7f9
        );

    font-size:
        clamp(42px, 8vw, 65px);
}


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

#pacListingAd .pac-ad-content {
    width: 100%;

    min-width: 0;
    min-height: 0;

    flex: 1 1 auto;

    padding:
        clamp(17px, 3vw, 26px);

    background: #fff;

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

    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   BRAND
========================================================= */

#pacListingAd .pac-ad-brand {
    display: flex;

    align-items: center;

    gap: 9px;

    width: 100%;

    margin:
        0 0 9px;

    color: #66717c;

    font-size: 12px;

    font-weight: 700;
}


#pacListingAd .pac-ad-brand-icon {
    width: 29px;
    height: 29px;

    min-width: 29px;

    display: flex;

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

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #07863f,
            #20bd69
        );

    color: #fff;

    font-size: 14px;

    font-weight: 900;

    box-shadow:
        0 5px 14px rgba(8,134,63,.25);
}


/* =========================================================
   TITLE
========================================================= */

#pacListingAd .pac-ad-content h2 {
    display: block;

    width: 100%;

    margin:
        0 0 8px;

    padding: 0;

    color: #101820;

    font-size:
        clamp(20px, 4vw, 29px);

    line-height: 1.16;

    font-weight: 850;

    letter-spacing: -.5px;

    overflow-wrap: anywhere;
}


/* =========================================================
   LOCATION
========================================================= */

#pacListingAd .pac-ad-location {
    display: flex;

    align-items: center;

    gap: 5px;

    width: 100%;

    margin:
        0 0 11px;

    color: #707a84;

    font-size: 12px;

    line-height: 1.4;
}


/* =========================================================
   DESCRIPTION
========================================================= */

#pacListingAd .pac-ad-description {
    width: 100%;

    margin:
        0 0 13px;

    color: #515c66;

    font-size:
        clamp(13px, 2vw, 14px);

    line-height: 1.55;

    overflow-wrap: anywhere;
}


/* =========================================================
   PRICE
========================================================= */

#pacListingAd .pac-ad-price {
    display: inline-flex;

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

    margin:
        0 0 15px;

    padding:
        7px 12px;

    border-radius: 10px;

    background: #eef9f2;

    color: #08783e;

    font-size:
        clamp(16px, 3vw, 19px);

    font-weight: 800;
}


/* =========================================================
   ACTIONS
========================================================= */

#pacListingAd .pac-ad-actions {
    display: flex;

    gap: 9px;

    width: 100%;

    margin:
        3px 0 0;
}


/* =========================================================
   VIEW
========================================================= */

#pacListingAd .pac-ad-view {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 46px;

    display: flex;

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

    gap: 7px;

    padding:
        11px 15px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #07863f,
            #14ad5c
        );

    color: #fff;

    font-size: 13px;

    font-weight: 800;

    line-height: 1.2;

    text-align: center;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(8,134,63,.20);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


#pacListingAd .pac-ad-view:hover {
    transform: translateY(-2px);

    color: #fff;

    text-decoration: none;

    box-shadow:
        0 11px 23px rgba(8,134,63,.28);
}


#pacListingAd .pac-ad-view span {
    display: inline-block;

    color: #fff;

    font-size: 17px;

    transition:
        transform .2s ease;
}


#pacListingAd .pac-ad-view:hover span {
    transform:
        translateX(3px);
}


/* =========================================================
   SHARE
========================================================= */

#pacListingAd .pac-ad-share {
    flex: 0 0 auto;

    min-width: 105px;
    min-height: 46px;

    display: flex;

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

    padding:
        11px 14px;

    border:
        1px solid #dfe5ea;

    border-radius: 12px;

    background: #f8fafb;

    color: #29333c;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}


#pacListingAd .pac-ad-share:hover {
    background: #eef3f6;

    border-color: #ccd5dc;

    transform:
        translateY(-1px);
}


/* =========================================================
   FOOTER
========================================================= */

#pacListingAd .pac-ad-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;

    margin:
        14px 0 0;

    padding:
        11px 0 0;

    border-top:
        1px solid #edf0f2;

    color: #89939c;

    font-size: 9.5px;

    line-height: 1.4;
}


#pacListingAd .pac-ad-secure {
    color: #148b4d;

    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   CLOSE
========================================================= */

#pacListingAd .pac-ad-close {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 100;

    width: 40px;
    height: 40px;

    display: flex;

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

    padding: 0;

    border: 0;

    border-radius: 50%;

    background:
        rgba(0,0,0,.58);

    color: #fff;

    font-family:
        Arial,
        sans-serif;

    font-size: 26px;

    line-height: 1;

    cursor: pointer;

    appearance: none;

    -webkit-appearance: none;

    box-shadow:
        0 4px 15px rgba(0,0,0,.20);

    transition:
        background .2s ease,
        transform .2s ease;
}


#pacListingAd .pac-ad-close:hover {
    background:
        rgba(0,0,0,.82);

    transform:
        rotate(90deg);
}


/* =========================================================
   LABEL
========================================================= */

#pacListingAd .pac-ad-label {
    position: absolute;

    top: 14px;
    left: 14px;

    z-index: 50;

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding:
        6px 10px;

    border-radius: 999px;

    background:
        rgba(0,0,0,.55);

    color: #fff;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .6px;

    white-space: nowrap;

    backdrop-filter:
        blur(6px);
}


#pacListingAd .pac-ad-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #35d07f;

    box-shadow:
        0 0 0 3px rgba(53,208,127,.15);
}


/* =========================================================
   TYPE
========================================================= */

#pacListingAd .pac-ad-type {
    position: absolute;

    left: 13px;
    bottom: 13px;

    z-index: 50;

    padding:
        7px 11px;

    border-radius: 999px;

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

    color: #16202a;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .5px;

    white-space: nowrap;

    box-shadow:
        0 5px 14px rgba(0,0,0,.14);
}


/* =========================================================
   TABLET
========================================================= */

@media (min-width: 481px) and (max-width: 900px) {

    #pacListingAd .pac-ad-container {
        width: min(540px, 94vw);

        max-height:
            calc(100dvh - 30px);

        border-radius: 22px;
    }

    #pacListingAd .pac-ad-image {
        height:
            clamp(210px, 36vh, 290px);

        max-height: 290px;
    }

}


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

@media (max-width: 480px) {

    #pacListingAd.pac-ad-overlay {
        padding: 8px;
    }

    #pacListingAd .pac-ad-container {
        width: 100%;

        max-width: 430px;

        max-height:
            calc(100dvh - 16px);

        border-radius: 19px;
    }

    #pacListingAd .pac-ad-image {
        height:
            clamp(165px, 30vh, 230px);

        min-height: 150px;

        max-height: 230px;
    }

    #pacListingAd .pac-ad-content {
        padding:
            16px 15px 14px;
    }

    #pacListingAd .pac-ad-content h2 {
        font-size: 20px;
    }

    #pacListingAd .pac-ad-description {
        font-size: 12.5px;
    }

    #pacListingAd .pac-ad-view {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 12px;
    }

    #pacListingAd .pac-ad-share {
        min-width: 90px;
        min-height: 44px;
        padding: 10px 11px;
        font-size: 11px;
    }

    #pacListingAd .pac-ad-close {
        width: 37px;
        height: 37px;

        top: 9px;
        right: 9px;

        font-size: 24px;
    }

}


/* =========================================================
   VERY SMALL
========================================================= */

@media (max-width: 360px) {

    #pacListingAd.pac-ad-overlay {
        padding: 5px;
    }

    #pacListingAd .pac-ad-container {
        max-height:
            calc(100dvh - 10px);

        border-radius: 16px;
    }

    #pacListingAd .pac-ad-image {
        height: 155px;
        min-height: 140px;
    }

    #pacListingAd .pac-ad-content {
        padding:
            13px 12px 12px;
    }

    #pacListingAd .pac-ad-actions {
        flex-direction: column;
    }

    #pacListingAd .pac-ad-view,
    #pacListingAd .pac-ad-share {
        width: 100%;
        min-width: 0;
        min-height: 42px;
    }

    #pacListingAd .pac-ad-footer {
        display: none;
    }

}


/* =========================================================
   SHORT SCREEN
========================================================= */

@media (max-height: 650px) {

    #pacListingAd .pac-ad-container {
        max-height:
            calc(100dvh - 12px);
    }

    #pacListingAd .pac-ad-image {
        height: 145px;
        min-height: 130px;
    }

    #pacListingAd .pac-ad-content {
        padding:
            12px 15px;
    }

}


/* =========================================================
   LANDSCAPE
========================================================= */

@media (max-width: 900px)
and (orientation: landscape) {

    #pacListingAd .pac-ad-container {
        width: min(760px, 96vw);

        max-height:
            calc(100dvh - 12px);

        flex-direction: row;
    }

    #pacListingAd .pac-ad-image {
        width: 45%;

        height: auto;

        min-height: 260px;

        max-height: none;

        flex: 0 0 45%;
    }

    #pacListingAd .pac-ad-content {
        width: 55%;

        flex:
            1 1 55%;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    #pacListingAd,
    #pacListingAd * {
        transition: none !important;
        animation: none !important;
    }

}