/* GPM Auction Manager 2.4.5 */
.gpm-auction-fields-row{display:flex;flex-wrap:wrap;gap:30px;width:100%;padding:38px 45px;margin:0 0 30px;background:#34495e;box-sizing:border-box}
.gpm-auction-fields-row .gpm-auction-field{width:calc(25% - 23px);margin:0}
.gpm-auction-fields-row .gpm-auction-field input,.gpm-auction-fields-row .gpm-auction-field select{width:100%;min-height:60px;box-sizing:border-box}
.gpm-auction-fields-row .gpm-auction-field select,.gpm-auction-fields-row .gpm-auction-field input[type="date"]{padding:0 18px;border:1px solid rgba(255,255,255,.14);background-color:rgba(20,34,48,.32);color:#fff}
.gpm-auction-fields-row .gpm-auction-field .stm-label{color:#fff;font-weight:700}
.gpm-auction-fields-row .gpm-auction-field .stm-label i{color:#e0a645}
.gpm-auction-fields-row .gpm-auction-field input::placeholder{color:rgba(255,255,255,.65)}
.gpm-auction-fields-row .gpm-auction-field select option{color:#222;background:#fff}

/* Single listing */

/* Independent full-width row below the single-listing price */
.gpm-am-auction-meta-single-row{display:block!important;clear:both!important;float:none!important;width:100%!important;max-width:none!important;flex:0 0 100%!important;align-self:stretch!important;margin:12px 0 4px!important;padding:0!important;text-align:left!important;box-sizing:border-box}
.gpm-am-auction-meta-single-row:before,.gpm-am-auction-meta-single-row:after{content:"";display:table;clear:both}
.gpm-am-auction-meta-single-row .gpm-am-auction-meta-single{display:block!important;clear:both!important;float:none!important;width:100%!important;max-width:none!important;margin:12px 0 4px!important;padding:10px 0 0!important;text-align:left!important;box-sizing:border-box}
.gpm-am-auction-meta-single{width:100%;margin:12px 0 4px;padding:10px 0 0;border-top:1px solid rgba(224,166,69,.22);text-align:left!important}
.gpm-am-end-date,.gpm-am-rating{font-family:inherit;line-height:1.25}
.gpm-am-end-date--single,.gpm-am-rating{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;margin:0;padding:7px 0;font-size:14px;text-align:left!important}
.gpm-am-meta-name{display:inline-flex;align-items:center;gap:10px;min-width:0;color:#e0a645!important;font-weight:500;text-align:left}
.gpm-am-meta-name i{width:18px;color:#e0a645!important;font-size:17px;line-height:1;text-align:center}
.gpm-am-end-label,.gpm-am-rating-label{color:#e0a645!important;opacity:1!important;font-weight:500}
.gpm-am-end-value,.gpm-am-rating-value{margin-left:auto;color:inherit;font-weight:700;text-align:right}

/* Classic list: price and gold auction panel */
.listing-list-loop .content .meta-top .gpm-am-price-auction-wrap{float:right;display:flex;align-items:stretch;gap:8px;margin-left:40px;position:relative;z-index:2}
.listing-list-loop .content .meta-top .gpm-am-price-auction-wrap>.price{float:none!important;margin-left:0!important;height:auto}
.listing-list-loop .content .meta-top .gpm-am-price-auction-wrap>.price:before{display:none!important}
.gpm-am-list-auction-box{display:flex;flex-direction:column;justify-content:center;min-width:182px;padding:8px 12px;background:#e0a645;color:#000!important;box-sizing:border-box;text-align:left}
.gpm-am-list-auction-box .gpm-am-end-date--card,.gpm-am-list-auction-box .gpm-am-rating{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:10px;width:100%;margin:0;padding:3px 0;color:#000!important;font-size:12px;line-height:1.2}
.gpm-am-list-auction-box .gpm-am-meta-name{gap:6px;color:#000!important;font-weight:600;white-space:nowrap}
.gpm-am-list-auction-box .gpm-am-meta-name i,.gpm-am-list-auction-box .gpm-am-end-label,.gpm-am-list-auction-box .gpm-am-rating-label{color:#000!important;font-size:12px}
.gpm-am-list-auction-box .gpm-am-end-value,.gpm-am-list-auction-box .gpm-am-rating-value{color:#000!important;font-weight:800;white-space:nowrap}

/* New Motors cards fallback */
.mvl-price-list-card .gpm-am-list-auction-box{margin-top:8px}

@media(max-width:1100px){.listing-list-loop .content .meta-top .gpm-am-price-auction-wrap{gap:5px;margin-left:20px}.gpm-am-list-auction-box{min-width:160px;padding:7px 9px}}
@media(max-width:1024px){.gpm-auction-fields-row .gpm-auction-field{width:calc(50% - 15px)}}
@media(max-width:767px){.gpm-auction-fields-row{padding:25px 20px;gap:20px}.gpm-auction-fields-row .gpm-auction-field{width:100%}.gpm-am-end-date--single,.gpm-am-rating{font-size:13px}.listing-list-loop .content .meta-top .gpm-am-price-auction-wrap{float:none;display:flex;flex-wrap:wrap;width:100%;margin:0 0 10px}.gpm-am-list-auction-box{width:100%;min-width:0}.listing-list-loop .content .meta-top .gpm-am-price-auction-wrap>.price{margin-left:auto!important}}


/* Shortcode output on a single auction. Placement is controlled by Elementor. */
.gpm-am-auction-shortcode {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}
.gpm-am-auction-shortcode .gpm-am-end-date,
.gpm-am-auction-shortcode .gpm-am-rating {
    width: 100%;
}

/* v2.2.0: czytelna cena JPY i orientacyjna cena PLN na listingu */
.gpm-am-price-jpy{display:block;white-space:nowrap}
.gpm-am-price-pln{display:block;margin-top:2px;color:#000!important;font-family:inherit;font-size:50%!important;font-weight:600!important;line-height:1.1!important;white-space:nowrap;text-align:center}
.listing-list-loop .price .gpm-am-price-pln,
.mvl-price-list-card .gpm-am-price-pln,
.mvl-price-grid-card .gpm-am-price-pln{color:#000!important}

/* v2.2.1: większa cena PLN na listingu, Oswald */
.gpm-am-price-pln{
    font-family:'Oswald',sans-serif!important;
    font-size:80%!important;
}

/* Cena w PLN pod ceną wywoławczą na pojedynczej aukcji */
.gpm-am-single-price-pln{
    display:block;
    margin-top:4px;
    color:#fff!important;
    font-family:'Oswald',sans-serif!important;
    font-size:60%!important;
    font-weight:500!important;
    line-height:1.15!important;
    white-space:nowrap;
    text-align:inherit;
}


/* v2.4.5: własna, tłumaczona etykieta ceny wywoławczej na kartach listingu */
.gpm-am-price-auction-wrap .normal-price::before,
.gpm-am-price-auction-wrap .sale-price::before,
.mvl-price-list-card .normal-price::before,
.mvl-price-list-card .sale-price::before,
.mvl-price-grid-card .normal-price::before,
.mvl-price-grid-card .sale-price::before{
    content:none!important;
    display:none!important;
}
.gpm-am-starting-price-label{
    display:block;
    margin:0 0 2px;
    color:inherit!important;
    font-family:inherit;
    font-size:12px!important;
    font-weight:700!important;
    line-height:1.05!important;
    text-transform:uppercase;
    white-space:nowrap;
}

/* v2.4.8: karty odtworzone przez AJAX + pełna obsługa mobile */
.gpm-am-list-auction-box--ajax{margin-top:8px}
.gpm-am-list-auction-box .gpm-am-meta-value{margin-left:auto;color:inherit;font-weight:800;white-space:nowrap;text-align:right}
.gpm-whatsapp-listing-button,.gpm-listing-details-button,.gpm-am-listing-ended{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;box-sizing:border-box;text-align:center;text-decoration:none!important}
.gpm-am-listing-ended{cursor:default;background:#666;color:#fff!important}

@media(max-width:767px){
  .gpm-am-list-auction-box--ajax{display:block;width:100%;min-width:0;margin:10px 0 0;padding:10px 12px;clear:both}
  .gpm-am-list-auction-box .gpm-am-end-date--card,
  .gpm-am-list-auction-box .gpm-am-rating{display:flex!important;justify-content:space-between!important;align-items:center!important;width:100%!important;font-size:12px!important}
  .gpm-whatsapp-listing-button,.gpm-listing-details-button,.gpm-am-listing-ended{width:100%;min-height:46px;margin:5px 0;float:none}
  .mvl-card-actions,.mvl-card-listing-actions,.single-car-actions,.mvl-card-bottom{display:flex!important;flex-direction:column!important;width:100%!important}
}


/* v2.5.2: nie ujawniaj desktopowych fragmentów szablonu na mobile. */
@media(max-width:767px){
  .elementor-hidden-mobile .gpm-am-list-auction-box,
  .elementor-hidden-mobile .gpm-auction-ended-button,
  .elementor-hidden-mobile .gpm-am-listing-ended,
  .hidden-xs .gpm-am-list-auction-box,
  .hidden-xs .gpm-auction-ended-button,
  .hidden-xs .gpm-am-listing-ended{display:none!important}
}


/* 2.5.7: przyciski muszą być ponad klikalną warstwą karty Motors. */
.gpm-whatsapp-listing-button,
.gpm-listing-details-button {
    position: relative !important;
    z-index: 50 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation;
}

.gpm-whatsapp-listing-button *,
.gpm-listing-details-button * {
    pointer-events: none !important;
}


/* 2.5.9: stały układ daty i oceny w każdej karcie panelu dealera */
.stm-user-private .gpm-am-price-auction-wrap > .gpm-am-list-auction-box--dealer,
.stm-user-private-main .gpm-am-price-auction-wrap > .gpm-am-list-auction-box--dealer {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    min-width: 190px !important;
    max-width: 250px !important;
    margin: 0 !important;
}


/* 2.6.5: nakładka statusu na zdjęciu zakończonej aukcji — desktop i mobile. */
.gpm-am-ended-image-area {
    position: relative !important;
    overflow: hidden;
}

.gpm-am-ended-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.48);
    pointer-events: none !important;
}

.gpm-am-ended-image-overlay__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 12px 24px;
    border: 2px solid currentColor;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .gpm-am-ended-image-overlay {
        padding: 10px;
    }

    .gpm-am-ended-image-overlay__label {
        min-width: 140px;
        padding: 9px 16px;
        font-size: 17px;
    }
}


/* 2.8.0: żadnych niewidocznych warstw akcji ani blokowania hit-testingu WebKit. */
.gpm-whatsapp-listing-button,
.gpm-listing-details-button,
.gpm-am-listing-ended {
    visibility: visible !important;
    opacity: 1 !important;
}

.gpm-am-listing-ended {
    pointer-events: none !important;
}


/*
 * 2.8.1: nadmiarowe CTA pozostają w DOM, aby Motors nie próbował ich
 * odbudowywać. display:none usuwa je z układu i hit-testingu WebKit.
 */
.gpm-am-duplicate-action {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    touch-action: none !important;
}


/*
 * 2.8.2: wrapper zawierający wyłącznie ukryty duplikat nie może zachowywać
 * własnej wysokości, marginesów ani paddingu. Pozostaje w DOM, więc Motors
 * nie próbuje go odbudowywać, a WebKit nie dostaje pętli mutacji.
 */
.gpm-am-empty-duplicate-wrapper {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}


/*
 * 2.8.3: mobilny Motors potrafi zachować wysokość kontenera CTA nawet po
 * ukryciu duplikatu. Kontener oznaczony przez JS ma naturalną wysokość i
 * układa wyłącznie widoczne akcje jedna pod drugą.
 */
@media (max-width: 767px) {
    .gpm-am-actions-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        align-content: flex-start !important;
        gap: 12px !important;
        row-gap: 12px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .gpm-am-actions-layout > .gpm-whatsapp-listing-button,
    .gpm-am-actions-layout > .gpm-listing-details-button,
    .gpm-am-actions-layout > .gpm-am-listing-ended {
        flex: 0 0 auto !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .gpm-am-actions-layout > .gpm-am-empty-duplicate-wrapper,
    .gpm-am-actions-layout > .gpm-am-duplicate-action {
        display: none !important;
        flex: 0 0 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}


/*
 * 2.8.10: status zakończonej aukcji korzysta z tego samego prostokątnego
 * języka wizualnego co pozostałe CTA. Reguły !important neutralizują
 * zaokrąglony styl natywnego slotu Motors, który jest używany ponownie.
 */
body .gpm-am-listing-ended {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 44px !important;
    padding: 11px 18px !important;
    border: 2px solid #777777 !important;
    border-radius: 4px !important;
    background: #777777 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: default !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

body .gpm-am-listing-ended i,
body .gpm-am-listing-ended span {
    color: #ffffff !important;
}

/*
 * 2.8.16: każda mobilna aukcja tworzy własny kontekst warstw.
 * Dekoracyjne lub klikalne warstwy pierwszej karty nie mogą już wychodzić
 * ponad kolejne karty i przejmować ich dotyku. CTA pozostają na wierzchu.
 */
@media (max-width: 767px) {
    .gpm-am-interactive-card {
        position: relative !important;
        z-index: 1 !important;
        isolation: isolate !important;
        pointer-events: auto !important;
    }

    .gpm-am-interactive-card .gpm-am-actions-layout {
        position: relative !important;
        z-index: 100 !important;
        isolation: isolate !important;
        pointer-events: auto !important;
    }

    .gpm-am-interactive-card .gpm-whatsapp-listing-button,
    .gpm-am-interactive-card .gpm-listing-details-button {
        position: relative !important;
        z-index: 101 !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .gpm-am-interactive-card .gpm-am-ended-image-overlay,
    .gpm-am-interactive-card .gpm-am-duplicate-action,
    .gpm-am-interactive-card .gpm-am-empty-duplicate-wrapper {
        pointer-events: none !important;
    }
}

