/* ==========================================================================
   SOWKA CUSTOM CSS — child theme overrides
   Utrzymywane: Karol / Claude Code
   Ładowane przez themes/sowka_child/config/theme.yml (priority: 200)

   Aby zmiany weszły w życie po edycji tego pliku:
     php bin/console prestashop:theme:enable sowka_child
     rm -rf var/cache/* themes/sowka_child/assets/cache/*
     curl -s -o /dev/null https://test.sowka.sklep.pl/
   ========================================================================== */

/* --------------------------------------------------------------------------
   Newsletter MailerLite layout fix — 2026-04-21
   Neutralizuje position:absolute bottom:-60px z parent sowka.scss linia 1218
   (parent SCSS nie jest w aktywnym pipeline, ale dla bezpieczeństwa
   na przyszłość dopisujemy override).
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .block_newsletter--content2 .ml-form-embedBody.ml-form-embedBodyHorizontal.row-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 6px;
    }
    .block_newsletter--content2 .ml-form-checkboxRow {
        position: static;
        bottom: auto;
        width: 100%;
        max-width: 500px;
        margin: 16px auto 0;
        padding: 0 8px;
        text-align: center;
    }
    .block_newsletter--content2 .ml-form-checkboxRow label.checkbox {
        display: block;
        max-width: 480px;
        margin: 0 auto;
        font-size: 13px;
        line-height: 1.55;
        color: #49627f;
        text-align: center;
        white-space: normal;
        padding: 0;
    }
}
@media (max-width: 767px) {
    .block_newsletter--content2 .ml-form-checkboxRow {
        position: static;
        bottom: auto;
        max-width: 100%;
        padding: 0 12px;
        text-align: center;
    }
    .block_newsletter--content2 .ml-form-checkboxRow label.checkbox {
        max-width: 100%;
        font-size: 12px;
        line-height: 1.5;
        white-space: normal;
    }
}


/* ============================================================
   Checkbox regulaminu — walidacja wizualna (2026-04-22)
   ============================================================ */
#conditions-to-approve.has-error {
    outline: 2px solid #dc3545;
    outline-offset: 4px;
    border-radius: 4px;
    padding: 4px;
}
#conditions-to-approve.has-error label {
    color: #dc3545;
}

/* ============================================
   Etap 1 Krok 2 — popup add-to-cart: turkusowy nagłówek
   Dopisane: 2026-04-24
   Uwaga: !important bo parent theme.css ma istniejące reguły o
   identycznej specyficzności (3 bloki dla #blockcart-modal .modal-header):
     - #blockcart-modal .modal-header, #product #block-reassurance { background:#fff }
     - #blockcart-modal .modal-header .close { opacity:1 }
     - #blockcart-modal .modal-header .close .material-icons { color:#363a42 }
   Kolejność ładowania (sowka-custom.css po parent/theme.css) wygrałaby
   sama, ale !important zabezpiecza na wypadek przyszłych edycji parent.
   ============================================ */
#blockcart-modal .modal-header {
  background-color: #6AD3C9 !important;
  color: #ffffff !important;
  border-bottom: none !important;
  padding: 14px 20px !important;
  border-top-left-radius: 6px !important;
  border-top-right-radius: 6px !important;
}
#blockcart-modal .modal-header .modal-title {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin: 0 !important;
}
#blockcart-modal .modal-header .close,
#blockcart-modal .modal-header .close:focus {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-size: 1.5rem !important;
  outline: none !important;
}
#blockcart-modal .modal-header .close .material-icons {
  color: #ffffff !important;
}
#blockcart-modal .modal-header .close:hover {
  opacity: 0.75 !important;
  color: #ffffff !important;
}

/* ============================================
   Etap 1 Krok 4 — popup add-to-cart: mobile layout
   Dopisane: 2026-04-24
   Cel: na <576px przyciski jeden pod drugim, pełna szerokość
   ============================================ */
@media (max-width: 575.98px) {
  #blockcart-modal .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  #blockcart-modal .modal-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 12px 16px !important;
  }
  #blockcart-modal .modal-footer .btn {
    width: 100% !important;
    margin: 0 !important;
  }
  #blockcart-modal .modal-body .row > [class*="col-"] {
    margin-bottom: 12px;
  }
}

/* Etap 6.5 — link 'Wróć do koszyka' pod CTA na /zamowienie */
.sowka-back-to-cart-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
}
.sowka-back-to-cart-link:hover {
    color: #324A5F;
    text-decoration: underline;
}
