/* =========================================================
 * Moduł „Zwroty i odstąpienia” (hqreturns)
 * Style ograniczone do kontenera .hqreturns-container, aby nie wpływać
 * na pozostałe elementy sklepu.
 * Paleta: primary #3a6ea5, success #2e9e5b, danger #d64545,
 *         warning #e0a800, info #3a6ea5.
 * ========================================================= */

.hqreturns-container {
    --hqr-primary: #3a6ea5;
    --hqr-success: #2e9e5b;
    --hqr-danger:  #d64545;
    --hqr-warning: #e0a800;
    --hqr-info:    #3a6ea5;
    --hqr-border:  #d9dee3;
    --hqr-muted:   #6b7480;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.hqreturns-track-page { max-width: 980px; }

/* --- Pasek kroków --- */
.hqreturns-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0 30px;
}
.hqreturns-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    background: #f1f3f5;
    color: var(--hqr-muted);
    font-size: 14px;
    font-weight: 500;
}
.hqreturns-step.active { background: var(--hqr-primary); color: #fff; }
.hqreturns-step.done   { background: var(--hqr-success); color: #fff; }
.hqreturns-step-num {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.hqreturns-step-arrow { color: #c2c8ce; font-size: 20px; line-height: 1; }

/* --- Karty --- */
.hqreturns-card {
    margin-bottom: 24px;
    border: 1px solid var(--hqr-border);
    border-radius: 6px;
    overflow: hidden;
}
.hqreturns-card .card-header,
.hqreturns-card .title_block {
    background: #f7f9fb;
    border-bottom: 1px solid var(--hqr-border);
    padding: 14px 20px;
    margin: 0;
}
.hqreturns-card .card-header h4,
.hqreturns-card .card-body h4 { margin: 0; font-size: 16px; font-weight: 600; }
.hqreturns-card .card-body,
.hqreturns-card .block_content { padding: 20px; }

/* --- Opcje zamówień --- */
.hqreturns-order-option {
    border: 2px solid #e5e8eb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}
.hqreturns-order-option:hover { border-color: var(--hqr-primary); }
.hqreturns-order-option.hqreturns-order-disabled { opacity: 0.55; background: #fafbfc; }
.hqreturns-order-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 600;
}
.hqreturns-order-label.disabled { cursor: default; }
.hqreturns-order-radio { margin-top: 3px; flex-shrink: 0; }
.hqreturns-order-details { display: flex; flex-direction: column; gap: 4px; }
.hqreturns-order-meta { font-size: 13px; color: var(--hqr-muted); font-weight: 400; }
.hqreturns-badge-done { display: inline-block; margin-top: 4px; }

/* --- Lista produktów --- */
.hqreturns-items-list {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--hqr-border);
    display: none;
}
.hqreturns-items-list.is-visible { display: block; }
.hqreturns-items-header { margin-bottom: 10px; font-size: 14px; }
.hqreturns-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f4;
    flex-wrap: wrap;
    gap: 10px;
}
.hqreturns-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}
.hqreturns-item-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.hqreturns-qty-wrap { display: flex; align-items: center; gap: 6px; }
.hqreturns-qty-wrap label { margin-bottom: 0; font-weight: 400; font-size: 13px; white-space: nowrap; }
.hqreturns-qty { width: 70px !important; display: inline-block !important; }
.hqreturns-max-qty { font-size: 12px; color: var(--hqr-muted); }

/* --- Notatki / podpowiedzi --- */
.hqreturns-hint { font-size: 13px; color: var(--hqr-muted); margin-bottom: 14px; }
.hqreturns-small { font-size: 13px; }
.hqreturns-mb-0 { margin-bottom: 0; }

/* --- Przyciski --- */
.hqreturns-form-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
    flex-wrap: wrap;
}
.hqreturns-buttons-center,
.hqreturns-confirm-buttons { justify-content: center; gap: 18px; }
.hqreturns-btn-next { padding: 12px 30px; font-size: 16px; }
.hqreturns-btn-confirm {
    padding: 14px 36px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 12px rgba(214, 69, 69, 0.32);
    transition: box-shadow 0.2s, transform 0.1s;
}
.hqreturns-btn-confirm:hover { box-shadow: 0 6px 18px rgba(214, 69, 69, 0.46); transform: translateY(-1px); }
.hqreturns-btn-withdrawal { font-size: 15px; padding: 10px 22px; font-weight: 600; }
.hqreturns-confirm-note, .hqreturns-keep-ref { margin-top: 12px; }

/* --- Sekcja w szczegółach zamówienia --- */
.hqreturns-order-section {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid var(--hqr-border);
    border-radius: 6px;
}
.hqreturns-section-title { margin-bottom: 14px; font-size: 16px; font-weight: 600; }
.hqreturns-order-info { margin-bottom: 12px; color: #4a525c; }
.hqreturns-legal-note { margin-top: 12px; font-size: 12px; color: var(--hqr-muted); }
.hqreturns-expired { color: var(--hqr-muted); font-size: 14px; }
.hqreturns-existing-alert { margin-bottom: 0; }

/* --- Podgląd oświadczenia (krok 2) --- */
.hqreturns-preview-card { border-color: var(--hqr-primary); }
.hqreturns-statement-header {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--hqr-primary);
}
.hqreturns-statement-header h5 { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.hqreturns-statement-table td { vertical-align: top; padding: 10px 14px; font-size: 13px; }
.hqreturns-datetime { font-size: 16px; color: var(--hqr-danger); }
.hqreturns-legal-text {
    margin-top: 18px;
    padding: 14px;
    background: #f7f9fb;
    border-left: 4px solid var(--hqr-primary);
    font-style: italic;
}
.hqreturns-return-items { padding-left: 18px; }
.hqreturns-confirm-warning { font-size: 15px; }

/* --- Strona sukcesu --- */
.hqreturns-success-box { text-align: center; padding: 30px; font-size: 15px; }
.hqreturns-reference {
    font-size: 20px;
    display: block;
    margin: 10px 0;
    font-family: monospace;
    letter-spacing: 1px;
    color: var(--hqr-primary);
}
.hqreturns-next-steps ol { font-size: 14px; line-height: 2; }
.hqreturns-keep-ref { font-size: 13px; }

/* --- Kafelki „Moje konto” --- */
.hqreturns-account-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
}
.hqreturns-account-icon { font-size: 36px; margin-bottom: 8px; color: var(--hqr-primary); }
.hqreturns-account-subtitle { font-size: 12px; color: var(--hqr-muted); font-style: normal; margin-top: 4px; }
.hqreturns-account-link--track .hqreturns-account-icon { color: var(--hqr-muted); }

/* --- Gość / logowanie --- */
.hqreturns-login-card { border-color: #e5e8eb; }
.hqreturns-order-summary-table td { padding: 8px 12px; vertical-align: middle; }
.hqreturns-guest-order-info { border-color: var(--hqr-primary); }

/* =========================================================
 * Śledzenie statusu
 * ========================================================= */
.hqreturns-track-search { position: sticky; top: 20px; }
.hqreturns-ref-input { font-family: monospace; font-size: 15px; letter-spacing: 0.5px; }
.hqreturns-track-result {
    border: 1px solid var(--hqr-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.hqreturns-track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.hqreturns-track-header--warning { background: #fff8e6; border-bottom: 3px solid var(--hqr-warning); }
.hqreturns-track-header--success { background: #e8f6ee; border-bottom: 3px solid var(--hqr-success); }
.hqreturns-track-header--danger  { background: #fbe9e9; border-bottom: 3px solid var(--hqr-danger); }
.hqreturns-track-header--info    { background: #e9f0f8; border-bottom: 3px solid var(--hqr-info); }
.hqreturns-track-header--default { background: #f1f3f5; border-bottom: 3px solid #aab1b8; }
.hqreturns-track-ref-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--hqr-muted); margin-bottom: 2px; }
.hqreturns-track-ref-value { font-family: monospace; font-size: 18px; letter-spacing: 1px; }
.hqreturns-track-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.hqreturns-track-badge--warning { background: var(--hqr-warning); color: #3a3200; }
.hqreturns-track-badge--success { background: var(--hqr-success); color: #fff; }
.hqreturns-track-badge--danger  { background: var(--hqr-danger); color: #fff; }
.hqreturns-track-badge--info    { background: var(--hqr-info); color: #fff; }
.hqreturns-track-badge--default { background: #aab1b8; color: #fff; }
.hqreturns-track-desc { padding: 14px 20px; font-size: 14px; line-height: 1.6; border-bottom: 1px solid #f0f2f4; background: #fafbfc; }
.hqreturns-track-details { padding: 18px 20px; }
.hqreturns-track-table { margin-bottom: 16px; }
.hqreturns-track-table td { padding: 8px 10px; font-size: 14px; border-color: #f0f2f4; vertical-align: middle; }
.hqreturns-track-td-label { color: var(--hqr-muted); white-space: nowrap; width: 40%; }
.hqreturns-track-items { font-size: 14px; margin-bottom: 16px; }
.hqreturns-track-item-list { margin: 8px 0 0; padding-left: 20px; line-height: 1.9; }

/* Oś czasu */
.hqreturns-timeline { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #e5e8eb; }
.hqreturns-timeline-track { display: flex; align-items: center; }
.hqreturns-timeline-step { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.hqreturns-timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: #d9dee3; border: 2px solid #bcc3ca; transition: background 0.2s, border-color 0.2s; }
.hqreturns-timeline-step.done .hqreturns-timeline-dot { background: var(--hqr-success); border-color: var(--hqr-success); }
.hqreturns-timeline-step.current .hqreturns-timeline-dot { background: var(--hqr-primary); border-color: var(--hqr-primary); box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.25); }
.hqreturns-timeline-label { font-size: 11px; color: var(--hqr-muted); margin-top: 5px; white-space: nowrap; }
.hqreturns-timeline-step.done .hqreturns-timeline-label,
.hqreturns-timeline-step.current .hqreturns-timeline-label { color: #2b3138; font-weight: 600; }
.hqreturns-timeline-line { flex: 1; height: 2px; background: #d9dee3; margin-bottom: 20px; transition: background 0.2s; }
.hqreturns-timeline-line.done { background: var(--hqr-success); }

/* Wskazówka */
.hqreturns-track-hint { padding: 28px 20px; background: #fafbfc; border: 1px dashed var(--hqr-border); border-radius: 8px; text-align: center; }
.hqreturns-track-hint-icon { font-size: 42px; margin-bottom: 12px; }
.hqreturns-track-hint h5 { font-size: 16px; margin-bottom: 16px; }
.hqreturns-track-hint ol { text-align: left; font-size: 14px; line-height: 2; max-width: 380px; margin: 0 auto; }

.hqreturns-btn-track { border-color: var(--hqr-primary); color: var(--hqr-primary); }
.hqreturns-btn-track:hover { background: var(--hqr-primary); color: #fff; }

/* --- Podgląd oświadczenia w panelu admina --- */
.hqreturns-statement-pre { white-space: pre-wrap; font-size: 12px; margin: 0; }

/* --- Responsywność --- */
@media (max-width: 576px) {
    .hqreturns-steps { flex-direction: column; align-items: flex-start; }
    .hqreturns-step-arrow { display: none; }
    .hqreturns-form-buttons { flex-direction: column-reverse; }
    .hqreturns-btn-next, .hqreturns-btn-confirm { width: 100%; text-align: center; }
    .hqreturns-item-row { flex-direction: column; align-items: flex-start; }
}
