/* ==========================================================================
   WP Withdrawal – front-end styles
   Compatible with PrestaShop Classic, Hummingbird and most custom themes.
   ========================================================================== */

/* Container */
.wpw-container {
    margin: 0 auto;
}

/* Header */
.wpw-header {
    margin-bottom: 30px;
}

.wpw-lead {
    font-size: 1rem;
    color: #555;
    max-width: 680px;
}

.wpw-info-box.card {
    border: 1px solid #eee;
}

.wpw-info-box .card-body {
    padding: 16px;
}

/* Cards */
.wpw-card {
    border-radius: 6px;
    margin-bottom: 24px;
}



td.wpw-col-product .d-flex {
    display: flex;
}
.wpw-card .card-body {
    padding: 15px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;    
}

.wpw-card .card-header {
    background: #f7f8fc;
    border-bottom: 1px solid #dde2e9;
    padding: 14px 15px;
}

.wpw-card-confirm {
    border: 0;
}

.wpw-card-info {
    background: #eef6ff;
    border-left: 4px solid #3498db;
    border-radius: 6px;
    padding: 12px;
}

/* Honeypot */
.wpw-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    tab-index: -1;
}

/* Theme-independent checkboxes (Classic + Hummingbird) */
.wpw-custom-checkbox {
    display: inline-block;
    position: relative;
    vertical-align: middle;
}

.wpw-custom-checkbox label {
    display: inline-flex;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    cursor: pointer;
}

.wpw-custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    z-index: 1;
    cursor: pointer;
}

.wpw-custom-checkbox input + span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    flex-shrink: 0;
    border: 1px solid #adb5bd;
    border-radius: 3px;
    background: #fff;
    transition: background .15s, border-color .15s;
}

/* Suppress theme pseudo-checkmarks (Hummingbird etc.) */
.wpw-custom-checkbox input + span::before,
.wpw-custom-checkbox input + span::after {
    content: none !important;
    display: none !important;
}

.wpw-custom-checkbox input:checked + span {
    background: #2fb5d2;
    border-color: #2fb5d2;
}

.wpw-custom-checkbox input:focus + span {
    box-shadow: 0 0 0 2px rgba(47, 181, 210, .35);
}

.wpw-custom-checkbox input + span .material-icons,
.wpw-custom-checkbox input + span .checkbox-checked {
    font-size: 14px;
    line-height: 1;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity .15s, transform .15s;
}

.wpw-custom-checkbox input:checked + span .material-icons,
.wpw-custom-checkbox input:checked + span .checkbox-checked {
    opacity: 1;
    transform: scale(1);
}

.wpw-products-table .wpw-custom-checkbox {
    line-height: 1;
}

.wpw-custom-checkbox .wpw-confirm-label {
    gap: 10px;
    align-items: flex-start;
}

.wpw-custom-checkbox .wpw-confirm-label input + span {
    margin-top: 3px;
}

/* Products table */
.wpw-products-table {
    font-size: .925rem;
}

.wpw-products-table .wpw-col-check {
    width: 48px;
    text-align: center;
    vertical-align: middle;
}

.wpw-products-table .wpw-col-qty-return {
    width: 110px;
}

.wpw-products-table .wpw-col-qty-ordered {
    width: 90px;
}

.wpw-product-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    flex-shrink: 0;
}

.wpw-qty-input {
    width: 72px !important;
    display: inline-block;
}

/* Legal confirmation label */
.wpw-confirm-label {
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    display: inline-flex;
    width: 100%;
}

.wpw-confirm-label span {
    min-width: 1.125rem;
    margin-top: 4px;
}

/* Action buttons */
.wpw-btn-submit {
    min-width: 200px;
    height: 48px;
    padding: .75rem 1.5rem;
    margin: 14px 0;
}

.wpw-btn-submit i {
    font-size: 18px;
    vertical-align: -3px;
    margin-right: 4px;
}

.wpw-actions {
    flex-wrap: wrap;
    gap: 12px;
}


.wpw-actions a.btn.btn-outline-secondary {
    color: #000;
    background: #f4f4f4;
    border-radius: .3rem;
    height: 50px;
    padding: .75rem 1.5rem;
}
.wpw-actions a.btn.btn-outline-secondary  i {
    font-size: 14px;
}

/* Confirmation page */
.wpw-confirmation-icon {
    font-size: 4rem;
    color: #27ae60;
    line-height: 1;
}

.wpw-confirmation-icon .material-icons {
    font-size: 50px;
}

.wpw-steps-list li {
    margin-bottom: 6px;
}

/* Footer link */
.wpw-footer-link {
    margin-top: 8px;
}

.wpw-withdrawal-link {
    font-size: .875rem;
    opacity: .85;
    transition: opacity .2s;
}

.wpw-withdrawal-link:hover {
    opacity: 1;
}

/* Order detail button */
.wpw-order-withdrawal-block {
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: 16px;
}

.wpw-btn-withdrawal {
    font-size: .9rem;
}

.wpw-withdrawal-hint {
    font-size: .8rem;
}

/* Existing request item – order detail */
.wpw-requests-list {
    margin-bottom: 12px;
}

.wpw-request-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-left: 4px solid #aaa;
    border-radius: 4px;
    margin-bottom: 6px;
    background: #fafafa;
    text-decoration: none;
    color: inherit;
    transition: background .15s, border-color .15s;
}
.wpw-request-item:hover {
    background: #f0f4ff;
    border-left-color: #476bcc;
    color: inherit;
    text-decoration: none;
}
.wpw-request-item.wpw-status-new       { border-left-color: #e0a800; }
.wpw-request-item.wpw-status-processed { border-left-color: #28a745; }
.wpw-request-item.wpw-status-rejected  { border-left-color: #dc3545; }

.wpw-request-item__icon {
    flex-shrink: 0;
    color: #888;
    line-height: 1;
}
.wpw-request-item__icon .material-icons {
    font-size: 22px;
    vertical-align: middle;
}
.wpw-request-item__body {
    flex: 1;
    min-width: 0;
}
.wpw-request-item__title {
    display: block;
    font-weight: 600;
    font-size: .9rem;
}
.wpw-request-item__date {
    display: block;
    font-size: .78rem;
    color: #888;
    margin-top: 2px;
}
.wpw-request-item__end {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpw-request-item__chevron .material-icons {
    font-size: 18px;
    color: #bbb;
    display: block;
}

/* Status badges – BS4 and BS5 compatible */
.wpw-badge {
    display: inline-block;
    padding: .25em .55em;
    font-size: .75em;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .3rem;
}
.wpw-badge-new       { background: #ffc107; color: #212529; }
.wpw-badge-processed { background: #28a745; color: #fff; }
.wpw-badge-rejected  { background: #dc3545; color: #fff; }

/* History page table badges */
.wpw-history-table .wpw-badge { font-size: .8em; }

/* Classic theme – account dashboard tile */
.links a.wpw-account-link.account-list-item {
    display: flex;
    align-items: start;
    gap: 8px;
}

/* Already-returned product rows */
.wpw-row-returned {
    opacity: .55;
    background: #f9f9f9;
}

.wpw-row-returned td {
    color: #888;
}

.wpw-img-returned {
    filter: grayscale(80%);
}

.wpw-nonreturnable-badge {
    font-weight: normal;
    white-space: normal;
    text-align: left;
    max-width: 320px;
    line-height: 1.4;
}

/* Info list */
.wpw-info-list {
    padding-left: 20px;
    margin: 10px 0 0;
    color: #555;
    list-style: disc;
}

.wpw-info-list li {
    display: list-item;
    list-style-type: disc;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Required field marker */
.wpw-container .required {
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 575.98px) {
    .wpw-products-table thead .wpw-col-qty-ordered,
    .wpw-products-table tbody .wpw-col-qty-ordered {
        display: none;
    }

    .wpw-btn-submit {
        width: 100%;
    }

    .wpw-actions {
        flex-direction: column;
    }

    .wpw-actions .btn {
        width: 100%;
        text-align: center;
    }

    .wpw-product-img {
        width: 40px;
        height: 40px;
    }
}

