/* ========================================================================== 
   VENTIA — HISTORIA, SZCZEGÓŁY ZAMÓWIENIA, ZWROTY I DANE RODO
   ========================================================================== */

body:is(#history, #order-detail, #order-slip, #discount, #order-follow, #order-return, #module-psgdpr-gdpr, #module-ps_emailalerts-account) #content {
  font-family: 'Poppins', sans-serif;
}

body:is(#history, #order-detail, #order-slip, #discount, #order-follow, #order-return) #content > h6 {
  margin: 0 0 18px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 20px;
  color: var(--ventia-color-text-secondary);
}

body:is(#history, #order-detail, #order-slip, #discount, #order-follow, #order-return) .table {
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: 10px;
  box-shadow: none;
}

body:is(#history, #order-detail, #order-slip, #discount, #order-follow, #order-return) .table.table-bordered :is(th, td) {
  border-right: 0;
  border-left: 0;
}

body:is(#history, #order-detail, #order-slip, #discount, #order-follow, #order-return) .table tbody tr:hover {
  background: var(--ventia-color-bg-soft);
}

body:is(#history, #order-detail) .label.label-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 16px;
  border-radius: 999px;
  box-shadow: none;
}

body#history .table tbody th {
  padding: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--ventia-color-text-primary);
  border-top: 1px solid var(--ventia-color-border-default);
}

body#history .table .order-actions {
  white-space: nowrap;
}

body#history .table .order-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 9px;
  margin: 2px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--ventia-color-brand-primary-dark);
  background: var(--ventia-color-brand-primary-light);
  border: 1px solid var(--ventia-color-bg-tint);
  border-radius: 8px;
  text-decoration: none;
}

body#history .table .order-actions a:hover {
  color: #fff;
  background: var(--ventia-color-brand-primary);
  border-color: var(--ventia-color-brand-primary);
}

body#history .orders .order {
  padding: 16px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#history .orders .order h3 {
  margin: 0 0 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ventia-color-text-primary);
}

body#history .orders .order :is(.date, .total) {
  margin-bottom: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: var(--ventia-color-text-secondary);
}

/* Sekcje szczegółów zastępują stare .box z szarym tłem i cieniem. */
body:is(#order-detail, #guest-tracking) #content.page-content {
  background: transparent;
  border: 0;
  padding: 0;
}

body:is(#order-detail, #guest-tracking) #content .box,
body:is(#order-detail, #guest-tracking) #content :is(#order-history, #delivery-address, #invoice-address) {
  padding: 20px 24px;
  margin-bottom: 16px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body:is(#order-detail, #guest-tracking) #content .box :is(h3, h4),
body:is(#order-detail, #guest-tracking) #content #order-history h3 {
  position: relative;
  padding-bottom: 12px;
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body:is(#order-detail, #guest-tracking) #content .box :is(h3, h4)::after,
body:is(#order-detail, #guest-tracking) #content #order-history h3::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  content: '';
  background: var(--ventia-color-brand-primary);
  border-radius: 3px;
}

body:is(#order-detail, #guest-tracking) #order-infos .box:first-child {
  color: var(--ventia-color-brand-primary-dark);
  background: var(--ventia-color-brand-primary-light);
  border-color: var(--ventia-color-bg-tint);
}

body:is(#order-detail, #guest-tracking) #order-infos .box:first-child strong {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

body:is(#order-detail, #guest-tracking) #order-infos .box ul,
body:is(#order-detail, #guest-tracking) #order-details ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

body:is(#order-detail, #guest-tracking) #order-infos .box li {
  padding: 5px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  line-height: 19px;
  color: var(--ventia-color-text-secondary);
}

body:is(#order-detail, #guest-tracking) #order-infos .box li strong {
  color: var(--ventia-color-text-primary);
}

body:is(#order-detail, #guest-tracking) .button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  background: var(--ventia-color-brand-primary);
  border: 0;
  border-radius: 10px;
  transition: var(--ventia-transition-button);
}

body:is(#order-detail, #guest-tracking) .button-primary:hover {
  color: #fff;
  background: var(--ventia-color-brand-primary-hover);
  text-decoration: none;
}

body:is(#order-detail, #guest-tracking) .addresses {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin-right: -8px;
  margin-left: -8px;
}

body:is(#order-detail, #guest-tracking) .addresses > [class*='col-'] {
  display: flex;
  padding: 8px;
}

body:is(#order-detail, #guest-tracking) .addresses article.box {
  flex: 1 1 auto;
  margin: 0;
}

body:is(#order-detail, #guest-tracking) .addresses address {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  line-height: 20px;
  color: var(--ventia-color-text-secondary);
}

body:is(#order-detail, #guest-tracking) .order-items,
body:is(#order-detail, #guest-tracking) .order-message-form,
body:is(#order-detail, #guest-tracking) #order-detail-content,
body:is(#order-detail, #guest-tracking) .order-message {
  padding: 20px 24px;
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body:is(#order-detail, #guest-tracking) #order-detail-content .order-line {
  padding: 14px 0;
  font-family: 'Poppins', sans-serif;
  border-bottom: 1px solid var(--ventia-color-border-default);
}

body:is(#order-detail, #guest-tracking) #order-detail-content .order-line:last-child {
  border-bottom: 0;
}

body:is(#order-detail, #guest-tracking) .history-lines .history-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-family: 'Poppins', sans-serif;
  border-bottom: 1px solid var(--ventia-color-border-default);
}

body:is(#order-detail, #guest-tracking) .history-lines .history-line::after {
  display: none;
}

body:is(#order-detail, #guest-tracking) .history-lines .date {
  font-size: 11px;
  color: var(--ventia-color-text-secondary);
}

/* Tabele kuponów, zwrotów i dokumentów mają ten sam zestaw akcji. */
body:is(#order-slip, #discount, #order-follow, #order-return) .table a {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--ventia-color-brand-primary-dark);
}

body:is(#order-slip, #discount, #order-follow, #order-return) .table a:hover {
  color: var(--ventia-color-brand-primary);
}

/* Moduł RODO dostarcza stary arkusz; body zapewnia wyższą specyficzność. */
body#module-psgdpr-gdpr #content.page-content,
body#module-psgdpr-gdpr .page_content,
body#module-psgdpr-gdpr .psgdpr-container {
  font-family: 'Poppins', sans-serif;
  color: var(--ventia-color-text-primary);
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

/* Sekcja modułu zawiera wyłącznie pływające kolumny; jej własna ramka
   zapadała się do pojedynczej linii nad pierwszą kartą. */
body#module-psgdpr-gdpr .page_content {
  padding: 0;
  background: transparent;
  border: 0;
}

body#module-psgdpr-gdpr :is(.panel, .card, .well, .box) {
  padding: 20px 24px;
  margin-bottom: 16px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#module-psgdpr-gdpr .psgdprinfo17 {
  width: 100%;
  padding: 20px 24px;
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  background: var(--ventia-color-bg-soft);
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#module-psgdpr-gdpr .psgdprinfo17 h2 {
  position: relative;
  padding-bottom: 12px;
  margin: 0 0 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body#module-psgdpr-gdpr .psgdprinfo17 h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  content: '';
  background: var(--ventia-color-brand-primary);
  border-radius: 3px;
}

body#module-psgdpr-gdpr .psgdprinfo17 p {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 20px;
  color: var(--ventia-color-text-secondary);
}

body#module-psgdpr-gdpr :is(.panel-heading, .card-header) {
  padding: 0 0 12px;
  margin: 0 0 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--ventia-color-border-default);
  box-shadow: none;
}

body#module-psgdpr-gdpr :is(.btn-default, .btn-secondary) {
  min-height: 40px;
  padding: 9px 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--ventia-color-text-secondary);
  text-transform: none;
  background: var(--ventia-color-bg-soft);
  border: 1px solid var(--ventia-color-border-default);
  border-radius: 10px;
  box-shadow: none;
}

@media (max-width: 767.98px) {
  body:is(#history, #order-detail, #guest-tracking) #content.page-content {
    padding: 0;
  }

  body:is(#order-detail, #guest-tracking) #content .box,
  body:is(#order-detail, #guest-tracking) #content :is(#order-history, #delivery-address, #invoice-address),
  body:is(#order-detail, #guest-tracking) :is(.order-items, .order-message-form, #order-detail-content, .order-message) {
    padding: 16px;
  }

  body:is(#order-detail, #guest-tracking) .addresses {
    display: block;
    margin: 0;
  }

  body:is(#order-detail, #guest-tracking) .addresses > [class*='col-'] {
    display: block;
    padding: 0;
  }

  body:is(#order-detail, #guest-tracking) .addresses article.box {
    margin-bottom: 12px;
  }

  body#module-psgdpr-gdpr :is(.panel, .card, .well, .box) {
    padding: 16px;
  }

  body#module-psgdpr-gdpr .psgdprinfo17 {
    padding: 16px;
  }

  body#module-psgdpr-gdpr #exportDataToPdf {
    margin-top: 12px;
  }
}
