/**
 * Bazowe style strukturalne widgetów Elementora DealerApp.
 * Ładowane warunkowo przez get_style_depends() - tylko gdy widget jest na stronie.
 * Kolory/typografia/odstępy idą z kontrolek Elementora (selektory), nie stąd.
 */

/* ── Wyposażenie ── */
.dealerapp-eq { --da-eq-cols: 2 }
.dealerapp-eq__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--da-eq-cols), minmax(0, 1fr)); column-gap: 24px; row-gap: 8px }
.dealerapp-eq__group:not(:last-child) { margin-bottom: 24px }
.dealerapp-eq__item { display: flex; align-items: flex-start; gap: 8px; line-height: 1.4 }
.dealerapp-eq__icon { flex: 0 0 auto; display: inline-flex; line-height: 1; margin-top: .15em; color: #16a34a }
.dealerapp-eq__icon svg { width: 1em; height: 1em; fill: currentColor }
.dealerapp-eq__icon--img { margin-top: 0 }
.dealerapp-eq__icon img { width: 1.25em; height: 1.25em; object-fit: contain; display: block }
.dealerapp-eq__acc summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none }
.dealerapp-eq__acc summary::-webkit-details-marker { display: none }
.dealerapp-eq__acc summary::after { content: ""; width: .5em; height: .5em; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s }
.dealerapp-eq__acc[open] summary::after { transform: rotate(-135deg) }
.dealerapp-eq__acc[open] summary { margin-bottom: 8px }
.dealerapp-eq__list--pills { display: flex; flex-wrap: wrap; gap: 8px }
.dealerapp-eq__list--pills .dealerapp-eq__item { align-items: center; background: rgba(0, 0, 0, .05); padding: 4px 12px; border-radius: 999px }
.dealerapp-eq__list--pills .dealerapp-eq__icon { margin-top: 0 }
@media (max-width: 600px) { .dealerapp-eq__list { grid-template-columns: 1fr } }

/* ── Specyfikacja ── */
.dealerapp-specs2 { --da-spec-cols: 2 }
.dealerapp-specs2--grid { display: grid; grid-template-columns: repeat(var(--da-spec-cols), minmax(0, 1fr)); column-gap: 32px }
.dealerapp-specs2--table { display: block }
.dealerapp-specs2--grid .dealerapp-specs2__row,
.dealerapp-specs2--table .dealerapp-specs2__row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(128, 128, 128, .22) }
.dealerapp-specs2__k { opacity: .75 }
.dealerapp-specs2__v { font-weight: 600; text-align: right }
.dealerapp-specs2--inline { display: flex; flex-wrap: wrap; gap: 8px }
.dealerapp-specs2__chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(128, 128, 128, .1); padding: 6px 12px; border-radius: 8px }
.dealerapp-specs2__chip .dealerapp-specs2__v { text-align: left }
/* Karty z ikonami (siatka) */
.dealerapp-specs2--cards { display: grid; grid-template-columns: repeat(var(--da-spec-cols, 4), minmax(0, 1fr)); gap: 24px }
.dealerapp-specs2__card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px }
.dealerapp-specs2__ic { display: inline-flex; align-items: center; justify-content: center; color: inherit; margin-bottom: 6px }
.dealerapp-specs2__ic svg { width: 40px; height: 40px }
.dealerapp-specs2__ic img { width: 40px; height: 40px; object-fit: contain; display: block }
.dealerapp-specs2--cards .dealerapp-specs2__k { opacity: .75 }
.dealerapp-specs2--cards .dealerapp-specs2__v { font-weight: 600 }
@media (max-width: 600px) {
    .dealerapp-specs2--grid { grid-template-columns: 1fr }
    .dealerapp-specs2--cards { grid-template-columns: repeat(2, 1fr); gap: 16px }
}

/* ── Tytuł nad blokiem (Wyposażenie / Pole / Specyfikacja) ── */
.dealerapp-block-title { margin: 0 0 10px; font-size: 1.1rem; font-weight: 600; line-height: 1.3 }

/* ── Cechy (DealerApp Cechy) - atuty Tak/Nie, tylko prawdziwe ── */
.dealerapp-feat { --da-feat-cols: 3 }
.dealerapp-feat--list { display: flex; flex-direction: column; gap: 8px }
.dealerapp-feat--list .dealerapp-feat__item { display: flex; align-items: center; gap: 8px }
.dealerapp-feat--inline { display: flex; flex-wrap: wrap; gap: 8px }
.dealerapp-feat--inline .dealerapp-feat__item { display: inline-flex; align-items: center; gap: 6px; background: rgba(128, 128, 128, .1); padding: 6px 12px; border-radius: 8px }
.dealerapp-feat--cards { display: grid; grid-template-columns: repeat(var(--da-feat-cols, 3), minmax(0, 1fr)); gap: 20px }
.dealerapp-feat--cards .dealerapp-feat__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px }
.dealerapp-feat__ic { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: inherit }
.dealerapp-feat__ic svg { width: 1.3em; height: 1.3em }
.dealerapp-feat__ic img { width: 1.3em; height: 1.3em; object-fit: contain; display: block }
.dealerapp-feat--cards .dealerapp-feat__ic svg { width: 36px; height: 36px }
.dealerapp-feat--cards .dealerapp-feat__ic img { width: 36px; height: 36px }
@media (max-width: 600px) { .dealerapp-feat--cards { grid-template-columns: repeat(2, 1fr); gap: 16px } }

/* ── Zdjęcie (DealerApp Zdjęcie) ── */
.dealerapp-img2-wrap { line-height: 0 }
.dealerapp-img2 { display: inline-block; max-width: 100%; margin: 0; overflow: hidden; vertical-align: top; text-decoration: none }
.dealerapp-img2 img { display: block; width: 100%; height: auto }
.dealerapp-img2--ratio img { height: 100%; object-fit: cover }
.dealerapp-img2 img { transition: transform .25s ease }
.dealerapp-img2-ph { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 140px; background: rgba(128, 128, 128, .12); opacity: .5; font-size: .85rem; line-height: 1.4 }

/* ── Telefon (DealerApp Telefon - przycisk „Pokaż numer") ── */
.dealerapp-tel-wrap { line-height: 1 }
.dealerapp-tel { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none; background: var(--brand, #2563eb); color: #fff; font: inherit; font-weight: 600; padding: 12px 20px; border-radius: 8px; text-decoration: none; transition: background .15s ease, color .15s ease, box-shadow .15s ease }
.dealerapp-tel__ic { display: inline-flex; align-items: center; flex: 0 0 auto }
.dealerapp-tel svg { width: 1.1em; height: 1.1em; flex: 0 0 auto }
.dealerapp-tel__ic i { font-size: 1.1em; line-height: 1 }
.dealerapp-tel--full { display: flex; width: 100%; justify-content: center }

/* ── Adres (DealerApp Adres) ── */
.dealerapp-addr2-wrap { line-height: 1.3 }
.dealerapp-addr2 { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; font: inherit; border: 1px solid rgba(128, 128, 128, .4); background: transparent; padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease }
.dealerapp-addr2--plain { border: none; background: none; padding: 0 }
a.dealerapp-addr2 { cursor: pointer }
a.dealerapp-addr2--plain:hover .dealerapp-addr2__txt { text-decoration: underline }
span.dealerapp-addr2 { cursor: default }

/* ── Formularz (DealerApp Formularz) ── */
.dealerapp-form-wrap { scroll-margin-top: 90px }
.dealerapp-form { display: flex; flex-direction: column; gap: 10px }
.dealerapp-form__input, .dealerapp-form__textarea { width: 100%; padding: 11px 14px; border: 1px solid rgba(128, 128, 128, .4); border-radius: 8px; background: rgba(128, 128, 128, .06); color: inherit; font: inherit; box-sizing: border-box }
.dealerapp-form__textarea { resize: vertical; min-height: 96px }
.dealerapp-form__input:focus, .dealerapp-form__textarea:focus { outline: none; border-color: rgba(128, 128, 128, .8) }
.dealerapp-form__consent { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; opacity: .9; line-height: 1.4 }
.dealerapp-form__consent input { margin-top: .2em; flex: 0 0 auto }
.dealerapp-form__submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: none; background: var(--brand, #2563eb); color: #fff; font: inherit; font-weight: 600; padding: 12px 20px; border-radius: 8px; transition: background .15s ease, color .15s ease }
.dealerapp-form__submit[disabled] { opacity: .6; cursor: default }
.dealerapp-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden }
.dealerapp-form__msg { font-size: .9rem; min-height: 1em }
.dealerapp-form__msg.is-ok { color: #16a34a }
.dealerapp-form__msg.is-err { color: #dc2626 }
.dealerapp-addr2--full { display: flex; width: 100%; justify-content: center; text-align: center }
.dealerapp-addr2__ic { display: inline-flex; align-items: center; flex: 0 0 auto }
.dealerapp-addr2__ic svg { width: 1.1em; height: 1.1em }
.dealerapp-addr2__ic i { font-size: 1.1em; line-height: 1 }

/* ── Opis (DealerApp Opis) ── */
.dealerapp-desc { line-height: 1.7 }
.dealerapp-desc p { margin: 0 0 12px }
.dealerapp-desc p:last-child { margin-bottom: 0 }
.dealerapp-desc-collapse { position: relative; overflow: hidden; max-height: var(--da-desc-h, 160px); transition: max-height .3s ease }
.dealerapp-desc-collapse.is-open { max-height: none }
/* Zanikanie u dołu (fade) - przez maskę, więc działa na każdym tle (jasnym i ciemnym) */
.dealerapp-desc-collapse.da-fade:not(.is-open) { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent) }
.dealerapp-desc-more { display: inline-block; margin-top: 10px; padding: 0; background: none; border: none; cursor: pointer; color: inherit; font: inherit; text-decoration: underline }
/* Akordeon opisu */
.dealerapp-desc-acc summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; font-weight: 600 }
.dealerapp-desc-acc summary::-webkit-details-marker { display: none }
.dealerapp-desc-acc summary::after { content: ""; width: .5em; height: .5em; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s }
.dealerapp-desc-acc[open] summary::after { transform: rotate(-135deg) }
.dealerapp-desc-acc[open] summary { margin-bottom: 10px }
.dealerapp-desc-acc__ic { display: inline-flex; align-items: center; flex: 0 0 auto }
.dealerapp-desc-acc__ic svg { width: 1.2em; height: 1.2em }
.dealerapp-desc-acc__ic i { font-size: 1.2em; line-height: 1 }
