/* x13withdrawals - Front-office styles */

.x13w-withdrawal-form.x13w-bs5 {
    max-width: 980px;
    margin: 0 auto;
}

.x13w-withdrawal-form .label.label-danger,
.x13w-withdrawal-form .label.bg-danger {
    font-size: .85em;
    padding: 3px 8px;
    border-radius: 3px;
}

/* Prevent tables from overflowing their container */
.x13w-order-reference {
  white-space: nowrap;
}

/* Allow buttons and badges to wrap */
.x13w-btn-withdraw,
.x13w-orders-table .btn,
.x13w-orders-table .x13w-order-state,
.x13w-products-table .btn {
    white-space: normal;
    word-wrap: break-word;
}

.x13w-orders-table td,
.x13w-orders-table th,
.x13w-history-table td,
.x13w-history-table th,
.x13w-products-table td,
.x13w-products-table th {
    vertical-align: middle;
}

.x13w-products-table td.x13w-product-name-cell,
.x13w-products-table td.x13w-product-image-cell {
    vertical-align: top;
}

.x13w-cell-withdrawn {
    text-align: center;
}

.x13w-order-state,
.x13w-badge-withdrawn {
    display: inline-block;
    font-size: 0.85em;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
    text-align: center;
}

/* Classic theme 1.7 - 1.7.8 */
.page-content:has(>.x13w-withdrawals-guest.x13w-ps17) {
  padding: 1rem;
  background: #fff;
  max-width: 640px;
  margin: 0 auto;
}

.x13w-withdrawal-form.x13w-ps17,
.x13w-withdrawals-guest.x13w-ps17,
.x13w-withdrawals.x13w-ps17 {
    font-size: .875rem;
    color: #7a7a7a;
}

.x13w-ps17 .box {
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, .2);
    background: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
}

.card .x13w-ps17 .box {
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}

.x13w-withdrawal-form.x13w-ps17 h2.page-heading,
.x13w-withdrawals-guest.x13w-ps17 h2.page-heading,
.x13w-withdrawals.x13w-ps17 h2.page-heading,
.x13w-withdrawal-form.x13w-ps17 h3,
.x13w-withdrawals-guest.x13w-ps17 h3,
.x13w-withdrawals.x13w-ps17 h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #232323;
    margin-bottom: 1rem;
}

.x13w-ps17 .x13w-qty-select,
.x13w-ps17 .x13w-reason-select {
  font-size: .875rem;
}

/* Classic theme 1.7.8+ */
.page-content:has(>.x13w-withdrawals-guest.x13w-ps178) {
  padding: 1rem;
  background: #fff;
  max-width: 640px;
  margin: 0 auto;
}

.x13w-withdrawals.x13w-ps178 .table {
  color: #7a7a7a;
}

.x13w-withdrawal-form.x13w-ps178,
.x13w-withdrawals-guest.x13w-ps178,
.x13w-withdrawals.x13w-ps178 {
  font-size: .875rem;
}

.x13w-withdrawal-form.x13w-ps178 h2.page-heading,
.x13w-withdrawals-guest.x13w-ps178 h2.page-heading,
.x13w-withdrawals.x13w-ps178 h2.page-heading,
.x13w-withdrawal-form.x13w-ps178 h3,
.x13w-withdrawals-guest.x13w-ps178 h3,
.x13w-withdrawals.x13w-ps178 h3,
.x13w-withdrawal-form.x13w-ps178 .box h4,
.x13w-withdrawals-guest.x13w-ps178 .box h4,
.x13w-withdrawals.x13w-ps178 .box h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #232323;
    text-transform: uppercase;
}

.x13w-ps178 .box {
    padding: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}

.card .x13w-ps178 .box {
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}

.x13w-ps178 .x13w-qty-select,
.x13w-ps178 .x13w-reason-select {
  font-size: .875rem;
}

/* Hummingbird 9+ */
.x13w-bs5 .box + .box{
  margin-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 1rem;
}

.x13w-bs5 .x13w-products-section.box + .box {
  border-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 767.98px) {
  .x13w-bs5 .box + .box{
    margin-top:1.25rem;
    padding-top: 1.25rem;
  }
}

.x13w-bs5 .table th,
.x13w-bs5 .table td {
  color: var(--bs-body-color);
}

.x13w-bs5 .x13w-reason-select,
.x13w-bs5 .x13w-qty-select,
.x13w-bs5 .x13w-order-reference,
.x13w-bs5 .x13w-order-total,
.x13w-bs5 .x13w-order-ordered,
.x13w-bs5 .x13w-order-withdrawn,
.x13w-bs5 .x13w-order-state {
  font-size: .875rem;
}

.x13w-bs5 .table .x13w-order-date {
  font-size: .75rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.x13w-bs5 .x13w-order-total {
  font-weight: 600;
}

/* PrestaShop 1.6 fix */
.x13w-ps16 .x13w-product-name-cell small {
  font-size: 12px;
}

.x13w-ps16 .x13w-btn-confirm {
  padding: 10px 14px;
  font-size: 17px;
  font-weight: 600;
}

.x13w-ps16 .label {
    border-radius: 0;
}

.x13w-ps16 .x13w-order-state {
    border-radius: 0;
}

.x13w-ps16 .x13w-order-reference a {
  text-decoration: underline;
  font-weight: 400;
}

.x13w-ps16 .x13w-reason-label,
.x13w-ps16 .x13w-order-state,
.x13w-ps16 .x13w-badge-withdrawn {
  font-size: 100%;
}



/* PrestaShop 1.6 alert icon alignment */
.x13w-ps16 .alert::before {
    display: inline;
    vertical-align: middle;
    float: none;
    margin-right: 5px;
}

/* PrestaShop 1.6 confirm products */
.x13w-ps16 .x13w-confirm-products {
    border-radius: 0;
    text-shadow: none;
}

/* History section */
.x13w-history-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.x13w-bs5 .x13w-history-section {
    border-top: 1px solid #dee2e6;
}

.x13w-history-message {
    font-size: 0.9em;
    color: #555;
    background: #f8f9fa;
}

/* Guest form */
.x13w-guest-form .btn {
    width: 100%;
}

.x13w-guest-form .form-footer {
    margin-top: 1.5rem;
}

.x13w-required {
    color: #dc3545;
}

.x13w-login-link {
    margin-top: 1rem;
}

.x13w-login-link p {
    margin-bottom: 0;
}

/* Withdrawal form */
.x13w-header-text,
.x13w-footer-text {
    margin: 1rem 0;
}

.x13w-product-reason .x13w-reason-select {
    width: clamp(160px, 100%, 100%);
    display: inline-block;
}
.x13w-products-table .x13w-qty-select {
    width: clamp(70px, 100%, 100%);
    display: inline-block;
    text-align: center;
}

.x13w-ps16 .x13w-product-reason .x13w-reason-select,
.x13w-ps16 .x13w-products-table .x13w-qty-select {
    width: clamp(70px, 100%, 226px) !important;
}

/* Reason inside product name cell */
.x13w-product-reason {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    align-items: baseline;
    gap: 0.5rem;
}

.x13w-reason-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
    margin-bottom: 0;
}

/* Product images */
.x13w-col-narrow {
    width: 120px;
}

.x13w-product-image-col {
    width: 65px;
}


.x13w-products-table td.x13w-product-image-cell {
    width: 65px;
}

.x13w-product-image {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: var(--bs-border-radius, 0);
}

/* Confirmation products */
.x13w-confirm-products-title {
    margin-top: 20px;
    font-size: 16px;
}

.x13w-confirm-products {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
    max-width: 100%;
}

.x13w-confirm-product-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.x13w-confirm-product-row:last-child {
    border-bottom: none;
}

.x13w-confirm-product-image {
    flex-shrink: 0;
    margin-right: 12px;
}

.x13w-confirm-product-info {
    flex: 1;
}

.x13w-confirm-product-meta {
    margin-top: 4px;
    font-size: 13px;
    color: #888;
}

.x13w-message-section {
    margin-bottom: 1.5rem;
}

.x13w-submit-section {
    margin: 1.5rem 0;
    text-align: center;
}

@media (max-width: 767px) {
    .x13w-submit-section .x13w-btn-confirm {
        width: 100%;
    }
}

.x13w-success-message {
    margin-bottom: 1rem;
}

.x13w-logged-out-text {
    margin-bottom: 1.5rem;
}

/* Footer link */
.x13w-footer-link {
    padding: 0.5rem 0;
}

.x13w-footer-link .btn {
    white-space: nowrap;
}

/* Mobile card layout - shared for order list and products table */
.x13w-mobile-cards {
    container-type: inline-size;
}

@container (max-width: 767.98px) {
    .x13w-bs5 .x13w-order-date  {
      font-size: .875rem;
    }

    .x13w-mobile-cards table,
    .x13w-mobile-cards tbody,
    .x13w-mobile-cards tr,
    .x13w-mobile-cards td {
        display: block;
        width: 100%;
    }

    .x13w-mobile-cards .table-bordered {
      border: 0;
    }

    .x13w-order-reference {
      white-space: unset;
    }

    .x13w-mobile-cards thead {
        display: none;
    }

    .x13w-mobile-cards tr {
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid var(--bs-border-color, #dee2e6);
        border-radius: var(--bs-border-radius, 0.5rem);
        background: #fff !important;
    }

    .x13w-ps16 .x13w-mobile-cards tr,
    .x13w-ps17 .x13w-mobile-cards tr {
      border-radius: 0;
    }

    .x13w-mobile-cards .table-striped > tbody > tr:nth-of-type(odd) > * {
        --bs-table-color-type: initial;
        --bs-table-bg-type: initial;
    }

    .x13w-mobile-cards td {
        padding: 0.25rem 0 !important;
        border: none !important;
        text-align: left !important;
    }

    .x13w-mobile-cards td[data-label] {
        display: flex;
        align-items: center;
        align-items: baseline;
        gap: 0 8px;
    }

    .x13w-mobile-cards td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 40%;
        font-weight: 600;
        color: var(--bs-secondary-color, #6c757d);
        font-size: 0.875rem;
        text-align: left !important;
    }

    .x13w-ps16 .x13w-mobile-cards td[data-label]::before {
      font-size: 100%;
    }

    /* Order list: action button full width */
    .x13w-mobile-cards .x13w-action-cell {
        padding-top: 0.5rem;
    }

    .x13w-mobile-cards .x13w-action-cell .btn {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Products: card as flex-wrap, image + name side by side */
    .x13w-mobile-cards .x13w-product-row {
        display: flex !important;
        flex-wrap: wrap;
    }

    .x13w-mobile-cards .x13w-product-row > td {
        flex: 0 0 100%;
    }

    .x13w-mobile-cards .x13w-product-image-cell {
        flex: 0 0 65px !important;
        width: 65px !important;
        padding-right: 0.75rem !important;
        padding-bottom: 0 !important;
    }

    .x13w-mobile-cards .x13w-product-name-cell {
        flex: 1 1 0 !important;
        min-width: 0;
        display: block !important;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem !important;
        border-bottom: 1px solid  var(--bs-border-color, #dee2e6);
    }

    .x13w-mobile-cards .x13w-product-name-cell::before {
        display: none;
    }

    /* Selects: full width on mobile */
    .x13w-mobile-cards .x13w-product-reason {
        flex-wrap: wrap;
    }
}
