/* ============================================================
   "Zapytaj o produkt" — wygląd okienka i przycisku.
   Ten plik możesz dowolnie edytować. Zmiany widać po odświeżeniu
   strony (nie trzeba czyścić cache PrestaShopa).
   ============================================================ */

/* ============================================================
   "Zapytaj o produkt" — okienko na środku ekranu (jak Allegro)
   Widoczność steruje CSS: :target (link #pap-inquiry) lub klasa
   .is-open (ustawiana awaryjnie przez JS).
   ============================================================ */

/* Przycisk-link na stronie produktu (w liście z dostawą/zwrotami) */
a.pap-inquiry-link,
a.pap-inquiry-link:hover,
a.pap-inquiry-link:focus {
    display: flex;
    align-items: center;
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
    touch-action: manipulation;
}

/* --- Okienko --- */
.pap-inq {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.pap-inq:target,
.pap-inq.is-open {
    display: flex;
}

.pap-inq__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: default;
}

.pap-inq__dialog {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.pap-inq__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e5e5;
}

.pap-inq__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.pap-inq__close,
.pap-inq__close:hover {
    font-size: 28px;
    line-height: 1;
    color: #1a1a1a;
    opacity: 0.6;
    text-decoration: none;
    padding: 0 4px;
}

.pap-inq__close:hover {
    opacity: 1;
}

.pap-inq__body {
    padding: 18px 22px 22px;
}

/* Produkt */
.pap-inq__product {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.pap-inq__thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    flex-shrink: 0;
}

.pap-inq__label {
    font-size: 13px;
    color: #565959;
    margin-bottom: 2px;
}

.pap-inq__product-link {
    font-size: 14px;
    font-weight: 600;
    color: #2162a1 !important;
     text-decoration: underline !important;
}

.pap-inq__product-link:hover {
    text-decoration: underline;
}

/* Pola formularza */
.pap-inq__field {
    display: block;
    margin-bottom: 14px;
}

.pap-inq__field span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.pap-inq__field input,
.pap-inq__field textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 16px; /* 16px = iPhone nie powiększa strony przy wpisywaniu */
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
}

.pap-inq__field textarea {
    resize: vertical;
    min-height: 100px;
}

.pap-inq__field input:focus,
.pap-inq__field textarea:focus {
    outline: none;
    border-color: #2162a1;
}

/* Stopka */
.pap-inq__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.pap-inq__cancel,
.pap-inq__cancel:hover {
    color: #565959;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 12px;
}

.pap-inq__cancel:hover {
    color: #1a1a1a;
}

/* Komunikaty */
.pap-inq__alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 14px;
}

.pap-inq__alert[hidden] {
    display: none;
}

.pap-inq__alert--error {
    background: #fdecea;
    color: #c0392b;
}

.pap-inq__alert--success {
    background: #e8f5e9;
    color: #17882d;
}

/* Honeypot — niewidoczne dla ludzi */
.pap-inq__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Blokada przewijania strony pod otwartym okienkiem */
body.pap-inq-open {
    overflow: hidden;
}
