/*
 * EU Withdrawal Button Compliance Manager for PrestaShop
 *
 * @author    HiddenTechies
 * @copyright 2026 HiddenTechies
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

.ht-wd-order-block { border: 1px solid #e5e5e5; border-radius: 6px; }
.ht-wd-order-block .ht-wd-title { margin-top: 0; font-size: 1.1rem; }
.ht-wd-order-block .ht-wd-button { margin-top: .5rem; }
.ht-wd-remaining { font-weight: 600; }

/* The account-page entry intentionally has NO module CSS: it reuses the
   theme's own .link-item / column styling so it renders exactly like the
   native account links (same approach as psgdpr). */

/* Request-type selector (withdrawal / return / exchange / damaged) */
.ht-wd-types { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.ht-wd-types .btn { flex: 0 0 auto; }
.ht-wd-type-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.ht-wd-type-buttons .ht-wd-button { margin-top: 0; }
.ht-wd-type-buttons .ht-wd-remaining { font-weight: 400; opacity: .85; }

/* Return instructions + logistics shown on the history page */
.ht-wd-instructions { font-size: .9rem; }
.ht-wd-pre { white-space: pre-line; }
.ht-wd-logistics { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .5rem 0; }
.ht-wd-logistics .material-icons { vertical-align: middle; font-size: 1.1rem; }
.ht-wd-tracking { font-size: .85rem; }
.ht-wd-my-attachments { font-size: .85rem; }
.ht-wd-selectall { margin-bottom: .75rem; font-weight: 600; }

/* Withdrawal / RMA form */
.ht-wd-form .ht-wd-line { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #f0f0f0; }
.ht-wd-form .ht-wd-line .ht-wd-line-img { flex: 0 0 auto; }
.ht-wd-form .ht-wd-line .ht-wd-line-img img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid #e6e6e6; background: #fff; display: block; }
.ht-wd-form .ht-wd-line .ht-wd-line-name { flex: 1 1 240px; font-weight: 600; }
.ht-wd-form .ht-wd-line .ht-wd-line-qty { width: 90px; }
.ht-wd-form .ht-wd-line.ht-wd-line-excluded { opacity: .55; }
.ht-wd-form .ht-wd-exclude-tag { font-size: .8rem; color: #b94a48; }
.ht-wd-form .ht-wd-legal { background: #f7f7f9; border-left: 3px solid #2980b9; padding: .75rem 1rem; margin: 1rem 0; font-size: .9rem; }
.ht-wd-form .ht-wd-confirm { margin: 1rem 0; }

/* Status badges + history */
.ht-wd-badge { display: inline-block; padding: .2rem .55rem; border-radius: 12px; color: #fff; font-size: .8rem; line-height: 1.4; }
.ht-wd-history-table { width: 100%; }
.ht-wd-history-table th, .ht-wd-history-table td { padding: .6rem; border-bottom: 1px solid #eee; vertical-align: top; }
.ht-wd-timeline { list-style: none; margin: 0; padding: 0; }
.ht-wd-timeline li { padding: .5rem 0 .5rem 1.2rem; border-left: 2px solid #e0e0e0; margin-left: .4rem; position: relative; }
.ht-wd-timeline li::before { content: ""; position: absolute; left: -6px; top: .8rem; width: 10px; height: 10px; border-radius: 50%; background: #2980b9; }
.ht-wd-timeline .ht-wd-time { color: #888; font-size: .8rem; }

/* Guest portal */
.ht-wd-guest .form-group { max-width: 420px; }

@media (max-width: 575px) {
  .ht-wd-form .ht-wd-line { flex-direction: column; align-items: flex-start; }
  .ht-wd-form .ht-wd-line .ht-wd-line-qty { width: 100%; }
  .ht-wd-history-table thead { display: none; }
  .ht-wd-history-table td { display: block; border: none; }
}

/* Inline validation + accessibility helpers (v1.1.1) */
.ht-wd-errors { margin: .75rem 0; }
.ht-wd-qty-hint { display: block; margin-top: .25rem; }
.ht-wd-resend { margin-top: 1rem; }
/* sr-only fallback for themes that ship Bootstrap 5 (which renames it to
   .visually-hidden) so the table caption stays accessible-only. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Review table — keep readable on small screens */
.ht-wd-review-table { width: 100%; }
@media (max-width: 575px) {
  .ht-wd-review-table { font-size: .9rem; }
}

/* Footer withdrawal button (v1.1.0) */
.ht-wd-footer { margin: .75rem 0; }
.ht-wd-footer--left { text-align: left; }
.ht-wd-footer--center { text-align: center; }
.ht-wd-footer--right { text-align: right; }
.ht-wd-footer__btn { display: inline-block; text-decoration: none; border-radius: .375rem; font-weight: 600; line-height: 1.2; transition: opacity .15s ease; }
.ht-wd-footer__btn:hover { opacity: .9; text-decoration: none; }
.ht-wd-footer__btn--small { padding: .35rem .75rem; font-size: .85rem; }
.ht-wd-footer__btn--medium { padding: .55rem 1.1rem; font-size: .95rem; }
.ht-wd-footer__btn--large { padding: .8rem 1.6rem; font-size: 1.1rem; }
.ht-wd-footer__link { text-decoration: underline; }
.ht-wd-footer__icon { vertical-align: middle; margin-right: .4em; }
.ht-wd-footer--floating { position: fixed; right: 1rem; bottom: 1rem; z-index: 1030; margin: 0; }
.ht-wd-footer--floating-left { right: auto; left: 1rem; }
