/* ========================================================
 * Zwroty Konsumentów – style
 * Dyrektywa (UE) 2023/2673
 * ======================================================== */

/* --- Kontener główny --- */
.zwroty-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* --- Pasek kroków --- */
.zwroty-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0 30px;
    flex-wrap: wrap;
    gap: 6px;
}

.zwroty-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.zwroty-step.active {
    background: #25b9d7;
    color: #fff;
}

.zwroty-step.done {
    background: #4cbb6c;
    color: #fff;
}

.zwroty-step-num {
    display: inline-flex;
    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;
}

.zwroty-step-arrow {
    color: #ccc;
    font-size: 20px;
    line-height: 1;
}

/* --- Karty sekcji --- */
.zwroty-card {
    margin-bottom: 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.zwroty-card .card-header,
.zwroty-card .panel-heading {
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
    padding: 14px 20px;
}

.zwroty-card .card-header h4,
.zwroty-card .card-body h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.zwroty-card .card-body {
    padding: 20px;
}

/* --- Opcje zamówień --- */
.zwroty-order-option {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.zwroty-order-option:hover {
    border-color: #25b9d7;
}

.zwroty-order-option.zwroty-order-disabled {
    opacity: 0.55;
    background: #fafafa;
}

.zwroty-order-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 600;
}

.zwroty-order-label.disabled {
    cursor: default;
}

.zwroty-order-radio {
    margin-top: 3px;
    flex-shrink: 0;
}

.zwroty-order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zwroty-order-meta {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

/* --- Lista produktów --- */
.zwroty-products-list {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #ddd;
    display: none;
}

.zwroty-products-list.visible {
    display: block;
}

.zwroty-products-header {
    margin-bottom: 10px;
    font-size: 14px;
}

.zwroty-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.zwroty-product-row label {
    margin-bottom: 0;
    font-weight: 400;
    flex: 1;
    min-width: 200px;
}

.zwroty-qty-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zwroty-qty-wrap label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 13px;
    white-space: nowrap;
}

.zwroty-qty {
    width: 70px !important;
    display: inline-block !important;
}

.zwroty-max-qty {
    font-size: 12px;
    color: #888;
}

/* --- Notatki --- */
.zwroty-no-reason-note,
.zwroty-prefill-note {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
}

/* --- Przyciski --- */
.zwroty-form-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.zwroty-confirm-buttons {
    justify-content: center;
    gap: 20px;
}

.zwroty-btn-next {
    padding: 12px 30px;
    font-size: 16px;
}

.zwroty-btn-confirm {
    padding: 14px 36px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
    transition: box-shadow 0.2s, transform 0.1s;
}

.zwroty-btn-confirm:hover {
    box-shadow: 0 6px 18px rgba(220, 53, 69, 0.5);
    transform: translateY(-1px);
}

.zwroty-btn-withdrawal {
    font-size: 15px;
    padding: 10px 22px;
    font-weight: 600;
}

/* --- Sekcja na stronie zamówienia --- */
.zwroty-order-section {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.zwroty-section-title {
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 600;
}

.zwroty-info {
    margin-bottom: 12px;
    color: #555;
}

.zwroty-legal-note {
    margin-top: 12px;
    font-size: 12px;
    color: #888;
}

.zwroty-expired {
    color: #888;
    font-size: 14px;
}

.zwroty-existing-alert {
    margin-bottom: 0;
}

/* --- Podgląd formularza UE (krok 2) --- */
.zwroty-preview-card {
    border-color: #25b9d7;
}

.zwroty-withdrawal-form-preview {
    font-size: 14px;
}

.zwroty-form-header {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #25b9d7;
}

.zwroty-form-header h5 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.zwroty-form-table td {
    vertical-align: top;
    padding: 10px 14px;
    font-size: 13px;
}

.zwroty-datetime {
    font-size: 16px;
    color: #e74c3c;
}

.zwroty-legal-text {
    margin-top: 18px;
    padding: 14px;
    background: #f9f9f9;
    border-left: 4px solid #25b9d7;
    font-style: italic;
}

.zwroty-return-products {
    padding-left: 18px;
}

.zwroty-confirm-warning {
    font-size: 15px;
}

.zwroty-confirm-note {
    margin-top: 14px;
}

/* --- Strona sukcesu --- */
.zwroty-success-box {
    text-align: center;
    padding: 30px;
    font-size: 15px;
}

.zwroty-reference {
    font-size: 20px;
    display: block;
    margin: 10px 0;
    font-family: monospace;
    letter-spacing: 1px;
    color: #25b9d7;
}

.zwroty-next-steps ol {
    font-size: 14px;
    line-height: 2;
}

/* --- Link w "Moje Konto" --- */
.zwroty-account-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.zwroty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    color: #25b9d7;
}

.zwroty-subtitle {
    font-size: 12px;
    color: #888;
    font-style: normal;
    margin-top: 4px;
}

/* --- Info box --- */
.zwroty-info-box {
    font-size: 14px;
}

/* --- Gość: formularz weryfikacji --- */
.zwroty-login-card {
    border-color: #e0e0e0;
}

.zwroty-btn-guest-auth {
    font-size: 15px;
    padding: 10px 20px;
}

/* --- Gość: info o zamówieniu (krok 1) --- */
.zwroty-guest-order-info {
    border-color: #25b9d7;
}

.zwroty-order-summary-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.zwroty-product-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.zwroty-product-check-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.zwroty-badge-done {
    display: inline-block;
    margin-top: 4px;
}

/* --- Pasek kroków – krok "0" dla gościa --- */
.zwroty-step-num {
    min-width: 24px;
}

/* =========================================================
 * Śledzenie statusu
 * ========================================================= */

.zwroty-status-page {
    max-width: 960px;
}

/* Karta wyszukiwania */
.zwroty-status-search-card {
    position: sticky;
    top: 20px;
}

.zwroty-ref-input {
    font-family: monospace;
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* Karta wyników */
.zwroty-status-result-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Nagłówek karty – kolor zależy od statusu */
.zwroty-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.zwroty-status-header--warning  { background: #fff8e1; border-bottom: 3px solid #ffc107; }
.zwroty-status-header--success  { background: #e8f5e9; border-bottom: 3px solid #4cbb6c; }
.zwroty-status-header--danger   { background: #fce4e4; border-bottom: 3px solid #e74c3c; }
.zwroty-status-header--info     { background: #e3f6fb; border-bottom: 3px solid #25b9d7; }
.zwroty-status-header--default  { background: #f5f5f5; border-bottom: 3px solid #aaa; }

.zwroty-status-ref-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 2px;
}

.zwroty-status-ref-value {
    font-family: monospace;
    font-size: 18px;
    letter-spacing: 1px;
}

/* Badge statusu (duży) */
.zwroty-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zwroty-status-badge--warning  { background: #ffc107; color: #333; }
.zwroty-status-badge--success  { background: #4cbb6c; color: #fff; }
.zwroty-status-badge--danger   { background: #e74c3c; color: #fff; }
.zwroty-status-badge--info     { background: #25b9d7; color: #fff; }
.zwroty-status-badge--default  { background: #aaa;    color: #fff; }

/* Opis statusu */
.zwroty-status-desc {
    padding: 14px 20px;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
}

.zwroty-status-desc--warning  { background: #fffdf0; }
.zwroty-status-desc--success  { background: #f4fbf6; }
.zwroty-status-desc--danger   { background: #fff5f5; }
.zwroty-status-desc--info     { background: #f0fafd; }
.zwroty-status-desc--default  { background: #fafafa; }

.zwroty-status-icon {
    margin-right: 6px;
    font-size: 16px;
}

/* Tabela szczegółów */
.zwroty-status-details {
    padding: 18px 20px;
}

.zwroty-status-table {
    margin-bottom: 16px;
}

.zwroty-status-table td {
    padding: 8px 10px;
    font-size: 14px;
    border-color: #f0f0f0;
    vertical-align: middle;
}

.zwroty-status-td-label {
    color: #666;
    white-space: nowrap;
    width: 40%;
}

/* Lista produktów */
.zwroty-status-products {
    font-size: 14px;
    margin-bottom: 16px;
}

.zwroty-status-product-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
    line-height: 1.9;
}

/* Oś czasu */
.zwroty-timeline {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e0e0e0;
}

.zwroty-timeline-track {
    display: flex;
    align-items: center;
    gap: 0;
}

.zwroty-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.zwroty-timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid #bbb;
    transition: background 0.2s, border-color 0.2s;
}

.zwroty-timeline-step.done .zwroty-timeline-dot {
    background: #4cbb6c;
    border-color: #4cbb6c;
}

.zwroty-timeline-step.current .zwroty-timeline-dot {
    background: #25b9d7;
    border-color: #25b9d7;
    box-shadow: 0 0 0 3px rgba(37,185,215,0.25);
}

.zwroty-timeline-label {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    white-space: nowrap;
}

.zwroty-timeline-step.done .zwroty-timeline-label,
.zwroty-timeline-step.current .zwroty-timeline-label {
    color: #333;
    font-weight: 600;
}

.zwroty-timeline-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.zwroty-timeline-line.done {
    background: #4cbb6c;
}

/* Wskazówka (stan początkowy – prawa kolumna) */
.zwroty-status-hint {
    padding: 28px 20px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    text-align: center;
}

.zwroty-status-hint-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.zwroty-status-hint h5 {
    font-size: 16px;
    margin-bottom: 16px;
}

.zwroty-status-hint ol {
    text-align: left;
    font-size: 14px;
    line-height: 2;
    max-width: 380px;
    margin: 0 auto 20px;
}

.zwroty-status-hint-legend {
    text-align: left;
    font-size: 13px;
    max-width: 340px;
    margin: 0 auto;
}

.zwroty-status-hint-legend ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Mini-badge dla legendy */
.zwroty-mini-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}

.zwroty-mini-badge.warning  { background: #ffc107; color: #333; }
.zwroty-mini-badge.success  { background: #4cbb6c; color: #fff; }
.zwroty-mini-badge.danger   { background: #e74c3c; color: #fff; }
.zwroty-mini-badge.info     { background: #25b9d7; color: #fff; }

/* Przycisk "Sprawdź status" na stronie sukcesu */
.zwroty-btn-check-status {
    border-color: #25b9d7;
    color: #25b9d7;
}

.zwroty-btn-check-status:hover {
    background: #25b9d7;
    color: #fff;
}

/* Kafelek statusu w Moim Koncie */
.zwroty-account-link--status .zwroty-icon {
    color: #888;
}

/* --- Responsywność --- */
@media (max-width: 576px) {
    .zwroty-steps {
        flex-direction: column;
        align-items: flex-start;
    }

    .zwroty-step-arrow {
        display: none;
    }

    .zwroty-form-buttons {
        flex-direction: column-reverse;
    }

    .zwroty-btn-next,
    .zwroty-btn-confirm {
        width: 100%;
        text-align: center;
    }

    .zwroty-product-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
