/* ═══════════════════════════════════════════════════════
   Electronic Withdrawal — Front-Office Styles
   Compatible with PrestaShop 1.6 default theme
   ═══════════════════════════════════════════════════════ */

/* Container */
.ew-withdrawal-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 10px 0 30px;
}

.ew-withdrawal-container .page-heading {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

.ew-withdrawal-container .page-heading i {
    margin-right: 8px;
    color: #f0ad4e;
}

/* Legal text */
.ew-legal-text {
    font-size: 13px;
    line-height: 1.6;
    border-left: 4px solid #5bc0de;
    background: #f4f8fb !important;
    color: #333 !important;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.ew-legal-text p {
    color: #333 !important;
}

.ew-legal-link {
    margin-bottom: 15px;
}

.ew-legal-link a {
    color: #337ab7;
    text-decoration: underline;
}

/* Panels */
.ew-withdrawal-container .panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ew-withdrawal-container .panel-heading {
    background: #f5f5f5;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.ew-withdrawal-container .panel-body {
    padding: 20px;
}

.ew-withdrawal-container .panel-footer {
    padding: 12px 15px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* Step badge */
.ew-step-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #f0ad4e;
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 8px;
    font-size: 14px;
}

/* Form fields */
.ew-withdrawal-container .form-group {
    margin-bottom: 15px;
}

.ew-withdrawal-container .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.ew-withdrawal-container .form-group label sup {
    color: #d9534f;
}

.ew-withdrawal-container .form-control {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.ew-withdrawal-container .form-control:focus {
    border-color: #66afe9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102,175,233,0.25);
}

/* Select styling (Uniform is removed via $.uniform.restore in our JS) */
.ew-withdrawal-container select.form-control {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    line-height: 34px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
}

.ew-withdrawal-container .help-block {
    color: #777;
    font-size: 12px;
    margin-top: 4px;
}

/* Products table */
.ew-products-table {
    margin-bottom: 0;
}

.ew-qty-input {
    width: 70px !important;
    text-align: center;
    display: inline-block !important;
}

/* IBAN section */
#ew-iban-section .alert {
    margin-bottom: 15px;
}

/* GDPR consent */
.ew-gdpr-consent {
    background: #fafafa;
    padding: 12px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    margin-top: 20px;
}

.ew-checkbox-label {
    display: table !important;
    font-weight: normal !important;
    cursor: pointer;
    width: 100%;
}

/* Uniform wraps checkbox in div.checker > span — align it as table-cell */
.ew-checkbox-label .checker,
.ew-checkbox-label > input[type="checkbox"] {
    display: table-cell;
    vertical-align: top;
    padding-top: 2px;
    width: 25px;
}

.ew-checkbox-label > span {
    display: table-cell;
    vertical-align: top;
    padding-left: 6px;
    line-height: 1.5;
}

/* Confirm button (Art. 11¹ alin. 6) */
.ew-confirm-btn {
    font-size: 18px !important;
    padding: 12px 30px !important;
    background: #5cb85c !important;
    border-color: #4cae4c !important;
    color: #fff !important;
    font-weight: bold;
}

.ew-confirm-btn:hover {
    background: #449d44 !important;
    border-color: #398439 !important;
}

.ew-step2-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* reCAPTCHA */
.ew-recaptcha-container {
    margin: 20px 0;
}

/* Summary table */
.ew-summary-table th {
    width: 180px;
    background: #f9f9f9;
}

/* Guest lookup */
.ew-lookup-status {
    margin-left: 10px;
    font-size: 13px;
}
.ew-lookup-status.ew-error {
    color: #d9534f;
}
.ew-lookup-status.ew-success {
    color: #5cb85c;
}

/* ═══════ WITHDRAWAL BUTTON (order detail hook) ═══════ */

.ew-order-withdrawal-btn {
    margin: 15px 0;
    text-align: center;
}

.ew-withdrawal-link {
    font-size: 16px !important;
    padding: 12px 24px !important;
    background: #f0ad4e !important;
    border-color: #eea236 !important;
    color: #fff !important;
    font-weight: bold;
    text-transform: none;
}

.ew-withdrawal-link:hover {
    background: #ec971f !important;
    border-color: #d58512 !important;
    color: #fff !important;
}

.ew-withdrawal-link i {
    margin-right: 8px;
}

/* ═══════ HISTORY PAGE ═══════ */

.ew-history-page .ew-new-request-link {
    margin-bottom: 20px;
}

.ew-history-table .ew-actions-cell {
    white-space: nowrap;
}

.ew-detail-row td {
    background: #fafafa !important;
}

.ew-detail-content {
    padding: 10px;
}

/* Status badges */
.ew-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}
.ew-status-pending            { background: #f0ad4e; }
.ew-status-processing         { background: #5bc0de; }
.ew-status-completed          { background: #5cb85c; }
.ew-status-refunded_no_return { background: #20c997; }
.ew-status-rejected           { background: #d9534f; }

/* ═══════ SUCCESS PAGE ═══════ */

.ew-success-page .alert-success {
    border-left: 4px solid #5cb85c;
}

.ew-success-page .ew-actions {
    margin-top: 20px;
}
.ew-success-page .ew-actions .btn {
    margin-right: 10px;
}

/* ═══════ RESPONSIVE ═══════ */

@media (max-width: 768px) {
    .ew-withdrawal-container {
        padding: 10px;
    }
    .ew-summary-table th {
        width: 120px;
    }
    .ew-step2-footer {
        flex-direction: column;
        gap: 10px;
    }
    .ew-step2-footer .btn {
        width: 100%;
    }
    .ew-qty-input {
        width: 55px !important;
    }
}
