/* Additions to style.css for the portal's PHP pages (EU Distributor Access). */

/* Server messages (flash) at the top of the workspace */
.page-alert { margin: 24px 0 0; border-radius: var(--db-radius, 4px); }

/* Skip link becomes visible on keyboard focus */
.visually-hidden-focusable:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 8px 14px; background: #fff; border: 2px solid var(--db-orange, #fa4616); }

/* Keep absolutely positioned helpers (e.g. visually-hidden table headings) inside the scrolling
   table box; otherwise they widen the whole page on phones. */
.table-responsive { position: relative; }

/* Product pictures from product-image.php fill the design's thumbnail box */
.cart-thumb img { object-fit: contain; }

/* Sortable table headings are focusable for keyboard sorting */
th.sortable:focus-visible { outline: 2px solid var(--db-orange, #fa4616); outline-offset: -2px; }

/* Order details: address blocks */
.eu-order address { font-style: normal; font-size: 14px; line-height: 1.6; color: var(--db-slate, #475569); }
.eu-order .daily-actions { gap: 12px; }

@media (max-width: 575.98px) {
  .daily-actions { flex-wrap: wrap; }
}

/* Distributor support pop-up (header link) */
.support-modal__email { align-items: flex-start; }
.support-modal__email img { flex: 0 0 auto; margin-top: 6px; }
.support-email__address { white-space: nowrap; }
@media (max-width: 359.98px) { .support-modal__email { font-size: 16px; } }

/* Header Cart link on the Cart page */
.portal-nav__cart.active { color: var(--db-orange, #fa4616); font-weight: 600; }

/* Deliveries page (copied from the USA portal stylesheet) */
/* Deliveries: expanded delivery (info line, boxes, shipped items) and tracking links */
.deliveries-table .order-detail > td { padding-left: 46px !important; padding-top: 4px !important; }
.delivery-info { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 4px 0 12px; font-size: 14px; color: var(--db-slate); }
.delivery-info b { font-weight: 600; color: var(--db-navy); margin-right: 4px; }
.delivery-info a, .tracking-link { color: var(--db-orange-dark); text-underline-offset: 2px; }
.tracking-link { font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-items--boxes { margin-bottom: 12px; }
.date-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 24px; }
.date-filter__label { font-weight: 600; font-size: 14px; color: var(--db-navy); margin-right: 4px; }
.date-filter .db-input { width: 170px; height: 40px; }
.date-filter__sep { font-size: 14px; color: var(--db-slate); }
.date-filter .btn { height: 40px; }
.date-filter__error { flex-basis: 100%; font-size: 13px; color: var(--db-danger, #b42318); }
.deliveries-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.deliveries-filters .date-filter, .deliveries-filters .status-filter { margin-top: 0; }
.deliveries-filters .status-filter { padding-left: 20px; border-left: 1px solid var(--db-line); }
@media (max-width: 1199.98px) {
  .deliveries-filters .status-filter { padding-left: 0; border-left: 0; }
}
@media (max-width: 575.98px) {
  .date-filter__label { flex-basis: 100%; }
  .date-filter .db-input { flex: 1 1 0; width: auto; min-width: 0; }
  .date-filter .btn { flex-basis: 100%; justify-content: center; text-align: center; }
}
.line-items--thumbs td { height: 52px !important; }
.line-items .col-thumb { width: 54px; padding-right: 0 !important; }
.cart-thumb.line-thumb { width: 40px; height: 40px; background: #fff; }
.deliveries-table .tracking-text { font-variant-numeric: tabular-nums; }
/* EU: date filter and carrier chips usually wrap onto two lines, so no divider before the chips */
.deliveries-filters .status-filter { padding-left: 0; border-left: 0; }
/* Expandable rows: chevron + label in one toggle button (click the text or the chevron) */
.order-toggle.order-toggle--label { width: auto; height: auto; margin-right: 0; display: inline-flex; align-items: center; gap: 6px; text-align: left; cursor: pointer; vertical-align: middle; }
.order-toggle--label img { flex: 0 0 auto; }
.order-toggle--label:hover .order-link { text-decoration: underline; }
.order-toggle--label:focus-visible { outline: 2px solid var(--db-orange, #fa4616); outline-offset: 2px; border-radius: 2px; }

/* Net Pricing link in the navigation (Excel download): bold black, next to Marketing Hub */
.portal-nav__extra--strong { font-weight: 700; color: #000; }
.portal-nav__extra--strong:hover { color: var(--db-orange); }

/* Home: Recent orders stretches to the height of "Get straight to business"; the timestamp note stays at the bottom */
.page-eu.page-home .section-row > .col-main > .orders-card { height: 100%; display: flex; flex-direction: column; }
.page-eu.page-home .section-row > .col-main > .orders-card > .table-responsive { flex: 1 1 auto; }
.page-eu.page-home .section-row > .col-main > .orders-card > .orders-card__note { margin-top: auto; }
/* Marketing Hub pop-up: keep the arrow on the same line as the button text */
.js-marketing-open { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Order summary: discount already included in the subtotal (shown as a note, not a deduction) */
.summary-line--note { font-size: 13px; color: var(--db-success); }

/* Cart: the "% off" under a discounted net price fades in when the line is new or its price changed
   (eu-app.js adds .is-animated); no motion for reduced-motion users. */
.price-save.is-animated { animation: price-save-in 0.3s 0.1s ease-out both; }
@keyframes price-save-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .price-save.is-animated { animation: none; }
}
