/* ============================================
   VetteZone - Zwroty i reklamacje (front)
   Paleta: #fbc800 zloty, #1a1a1a tlo, #2d2d2d karta, #3a3a3a obramowanie
   ============================================ */

.vzr {
    --vzr-gold: #fbc800;
    --vzr-gold-hover: #e0b400;
    --vzr-bg: #1a1a1a;
    --vzr-border: #3a3a3a;
    --vzr-text: #e0e0e0;
    --vzr-muted: #999999;
    --vzr-red: #cf0202;
    color: var(--vzr-text);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    text-align: left;
}

.vzr *, .vzr *::before, .vzr *::after { box-sizing: border-box; }

/* --- karty --- */
.vzr-card {
    background: linear-gradient(145deg, #2d2d2d, #222222);
    border: 1px solid var(--vzr-border);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}
.vzr-card--narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

.vzr-h2 { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 12px; text-transform: none; }
.vzr-h3 {
    color: var(--vzr-gold);
    font-size: 16px;
    font-weight: 700;
    margin: 24px 0 14px;
    padding-left: 12px;
    border-left: 3px solid var(--vzr-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.vzr-mt0 { margin-top: 0; }
.vzr-m0 { margin: 0; }
.vzr-muted { color: var(--vzr-muted); font-size: 14px; }
.vzr-center { text-align: center; }
.vzr-right { text-align: right; }
.vzr-gold { color: var(--vzr-gold); }
.vzr-prewrap { white-space: pre-line; word-break: break-word; }
.vzr-link, .vzr a:not(.vzr-btn) { color: var(--vzr-gold); }
.vzr-link:hover { color: var(--vzr-gold-hover); }

/* --- alerty --- */
.vzr-alert {
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid;
}
.vzr-alert ul { margin: 0; padding-left: 18px; }
.vzr-alert--error { background: rgba(207, 2, 2, 0.12); border-color: rgba(207, 2, 2, 0.5); color: #ffb3b3; }
.vzr-alert--warn { background: rgba(251, 200, 0, 0.08); border-color: rgba(251, 200, 0, 0.45); color: #ffe27a; }
.vzr-alert--info { background: rgba(255, 255, 255, 0.04); border-color: var(--vzr-border); color: var(--vzr-text); }
.vzr-alert--ok { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.45); color: #a7f3c1; }

/* --- formularz --- */
.vzr-grid { display: flex; flex-wrap: wrap; gap: 0 24px; }
.vzr-field { flex: 1 1 calc(50% - 12px); min-width: 240px; margin-bottom: 20px; }
.vzr-field--full { flex-basis: 100%; }
.vzr-field--split { display: flex; gap: 16px; }
.vzr-field--split > div { flex: 1; }

.vzr-label {
    display: block;
    color: var(--vzr-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px;
}
.vzr-label.required::after { content: ' *'; color: var(--vzr-gold); }

.vzr .vzr-input {
    display: block;
    width: 100%;
    background-color: var(--vzr-bg);
    color: var(--vzr-text);
    border: 1px solid var(--vzr-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.vzr .vzr-input:focus { border-color: var(--vzr-gold); box-shadow: 0 0 0 3px rgba(251, 200, 0, 0.12); }
.vzr .vzr-input::placeholder { color: #555; }
.vzr .vzr-input[readonly] { opacity: 0.7; }
.vzr .vzr-input--sm { width: auto; padding: 6px 10px; font-size: 14px; }
.vzr select.vzr-input { cursor: pointer; }
.vzr textarea.vzr-input { resize: vertical; min-height: 110px; }
.vzr-upper { text-transform: uppercase; }
.vzr-help { display: block; color: #777; font-size: 12px; margin-top: 6px; line-height: 1.5; }

.vzr-radios { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.vzr-radios--column { flex-direction: column; }
.vzr-radios label, .vzr-check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; color: var(--vzr-text); font-size: 15px; margin: 0; }
.vzr-check small { display: block; color: var(--vzr-muted); font-size: 12px; }
.vzr input[type="radio"], .vzr input[type="checkbox"] { accent-color: var(--vzr-gold); width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }

.vzr-file {
    display: block;
    width: 100%;
    color: var(--vzr-muted);
    background: var(--vzr-bg);
    border: 1px dashed var(--vzr-border);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
}
.vzr-file::file-selector-button {
    background: var(--vzr-gold);
    color: #1a1a1a;
    border: 0;
    border-radius: 6px;
    padding: 8px 16px;
    margin-right: 12px;
    font-weight: 700;
    cursor: pointer;
}
.vzr-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vzr-file-list span { background: #111; border: 1px solid var(--vzr-border); border-radius: 6px; padding: 4px 10px; font-size: 12px; color: var(--vzr-text); }

/* pole-pulapka na boty */
.vzr-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- wybor rodzaju --- */
.vzr-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.vzr-type { margin: 0; cursor: pointer; }
.vzr-type input { position: absolute; opacity: 0; pointer-events: none; }
.vzr-type__box {
    display: block;
    height: 100%;
    background: var(--vzr-bg);
    border: 2px solid var(--vzr-border);
    border-radius: 10px;
    padding: 16px 18px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.vzr-type__box strong { display: block; color: #fff; font-size: 16px; margin-bottom: 4px; }
.vzr-type__box small { color: var(--vzr-muted); font-size: 13px; line-height: 1.45; }
.vzr-type:hover .vzr-type__box { border-color: #666; }
.vzr-type input:checked + .vzr-type__box { border-color: var(--vzr-gold); background: rgba(251, 200, 0, 0.07); }
.vzr-type input:focus-visible + .vzr-type__box { box-shadow: 0 0 0 3px rgba(251, 200, 0, 0.3); }

/* --- produkty --- */
.vzr-products { display: flex; flex-direction: column; gap: 10px; }
.vzr-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--vzr-bg);
    border: 1px solid var(--vzr-border);
    border-radius: 8px;
    padding: 12px 16px;
}
.vzr-product.is-selected { border-color: var(--vzr-gold); }
.vzr-qty { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--vzr-muted); font-size: 13px; white-space: nowrap; }

/* --- przyciski --- */
.vzr-footer { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--vzr-border); text-align: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.vzr-btn, a.vzr-btn {
    display: inline-block;
    background: var(--vzr-gold);
    color: #1a1a1a !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 36px;
    border: 2px solid var(--vzr-gold);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.vzr-btn:hover { background: var(--vzr-gold-hover); border-color: var(--vzr-gold-hover); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(251, 200, 0, 0.25); }
.vzr-btn--sm, a.vzr-btn--sm { padding: 7px 16px; font-size: 12px; letter-spacing: 1px; }
.vzr-btn--ghost { background: transparent; color: var(--vzr-gold) !important; }
.vzr-btn--ghost:hover { background: rgba(251, 200, 0, 0.1); }
.vzr-btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* --- tabele --- */
.vzr-table-wrap { overflow-x: auto; }
.vzr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vzr-table th { color: var(--vzr-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--vzr-border); }
.vzr-table td { padding: 12px; border-bottom: 1px solid #2f2f2f; color: var(--vzr-text); vertical-align: middle; }

/* --- status --- */
.vzr-status {
    --vzr-status: #999;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--vzr-status);
    border: 1px solid var(--vzr-status);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}
.vzr-status--sm { padding: 2px 10px; font-size: 12px; }

/* --- podglad zgloszenia --- */
.vzr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.vzr-dl { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 10px 20px; margin: 0; }
.vzr-dl dt { color: var(--vzr-muted); font-weight: 600; font-size: 13px; }
.vzr-dl dd { margin: 0; color: var(--vzr-text); }
.vzr-list { margin: 0; padding-left: 18px; }
.vzr-list li { margin-bottom: 6px; }
.vzr-quote { background: var(--vzr-bg); border-left: 3px solid var(--vzr-border); border-radius: 6px; padding: 12px 16px; }

.vzr-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.vzr-thumb { display: block; width: 110px; height: 110px; border-radius: 8px; overflow: hidden; border: 1px solid var(--vzr-border); background: #111; }
.vzr-thumbs--sm .vzr-thumb { width: 72px; height: 72px; }
.vzr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vzr-thumb__file { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--vzr-gold); font-weight: 800; }

.vzr-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--vzr-border); }
.vzr-timeline li { position: relative; padding: 0 0 16px 14px; }
.vzr-timeline li::before { content: ''; position: absolute; left: -26px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--vzr-status, #999); border: 3px solid #222; }
.vzr-timeline strong { color: #fff; }

.vzr-messages { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.vzr-msg { max-width: 85%; border-radius: 10px; padding: 12px 16px; border: 1px solid var(--vzr-border); }
.vzr-msg--me { align-self: flex-end; background: #1f1f1f; }
.vzr-msg--shop { align-self: flex-start; background: rgba(251, 200, 0, 0.07); border-color: rgba(251, 200, 0, 0.35); }
.vzr-msg__meta { color: var(--vzr-muted); font-size: 12px; margin-bottom: 6px; }
.vzr-msg .vzr-thumbs { margin-top: 10px; }
.vzr form .vzr-file { margin-top: 12px; }

/* --- sukces --- */
.vzr-success { text-align: center; }
.vzr-success__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--vzr-gold); color: #1a1a1a; font-size: 34px; font-weight: 800; line-height: 64px; }
.vzr-refno { font-size: 30px; font-weight: 800; color: var(--vzr-gold); letter-spacing: 2px; margin: 4px 0 8px; }
.vzr-next { text-align: left; max-width: 640px; margin: 24px auto 0; }
.vzr-next ol { padding-left: 20px; }
.vzr-next li { margin-bottom: 10px; line-height: 1.55; }
.vzr-address { background: var(--vzr-bg); border: 1px solid var(--vzr-border); border-radius: 8px; padding: 14px 18px; margin-top: 16px; }

/* --- box w szczegolach zamowienia --- */
.vzr-order-box { margin-top: 20px; }
.vzr-order-box .vzr-btn { margin-top: 6px; }

/* --- przycisk na liscie zamowien (historia) --- */
.vzr-history-link { display: inline-block; margin-left: 10px; color: #fbc800 !important; font-weight: 600; white-space: nowrap; }

/* --- mobile --- */
@media (max-width: 767px) {
    .vzr-card { padding: 20px 16px; }
    .vzr-field { flex-basis: 100%; min-width: 0; }
    .vzr-field--split { flex-direction: column; gap: 0; }
    .vzr-field--split > div { margin-bottom: 20px; }
    .vzr-product { flex-direction: column; align-items: flex-start; }
    .vzr-dl { grid-template-columns: 1fr; gap: 2px; }
    .vzr-dl dd { margin-bottom: 10px; }
    .vzr-msg { max-width: 100%; }
    .vzr-btn, a.vzr-btn { width: 100%; text-align: center; }
    .vzr-table thead { display: none; }
    .vzr-table tr { display: block; border-bottom: 1px solid var(--vzr-border); padding: 8px 0; }
    .vzr-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; }
    .vzr-table td[data-label]::before { content: attr(data-label); color: var(--vzr-muted); font-size: 12px; text-transform: uppercase; }
    .vzr-table td.vzr-right { justify-content: flex-end; }
}

/* --- wydruk (strona po wyslaniu zwrotu) --- */
@media print {
    .vzr-noprint, header, footer, #header, #footer, .breadcrumb { display: none !important; }
    .vzr-card { background: #fff !important; border: 1px solid #999; color: #000; }
    .vzr, .vzr-h2, .vzr-muted, .vzr-next li { color: #000 !important; }
    .vzr-refno { color: #000 !important; }
}

/* --- kafelki rodzaju: motyw wyrownuje etykiety do prawej --- */
.vzr .vzr-type, .vzr .vzr-type__box, .vzr .vzr-check, .vzr .vzr-radios label { text-align: left; }

/* --- modal z wynikiem (sukces / blad) --- */
html.vzr-modal-open { overflow: hidden; }
.vzr-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.vzr-modal.is-open { visibility: visible; opacity: 1; transition: opacity 0.25s ease; }
.vzr-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(3px); }
.vzr-modal__box {
    --vzr-accent: #fbc800;
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: linear-gradient(145deg, #2d2d2d, #1f1f1f);
    border: 1px solid #3a3a3a;
    border-top: 4px solid var(--vzr-accent);
    border-radius: 14px;
    padding: 36px 32px 28px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease;
    outline: none;
}
.vzr-modal.is-open .vzr-modal__box { transform: none; }
.vzr-modal--error .vzr-modal__box { --vzr-accent: #cf0202; }
.vzr-modal__x {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: 0;
    color: #888;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.vzr-modal__x:hover { color: #fff; }
.vzr-modal__icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--vzr-accent);
    color: #1a1a1a;
    font-size: 36px;
    font-weight: 800;
    line-height: 68px;
    box-shadow: 0 0 0 8px rgba(251, 200, 0, 0.12);
}
.vzr-modal--error .vzr-modal__icon { color: #fff; box-shadow: 0 0 0 8px rgba(207, 2, 2, 0.15); }
.vzr-modal__title { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 10px; text-transform: none; }
.vzr-modal__text { color: #cfcfcf; font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.vzr-modal__list {
    text-align: left;
    margin: 8px 0 4px;
    padding: 14px 18px 14px 34px;
    background: rgba(207, 2, 2, 0.1);
    border: 1px solid rgba(207, 2, 2, 0.4);
    border-radius: 8px;
    color: #ffc2c2;
    font-size: 14px;
}
.vzr-modal__list li { margin-bottom: 4px; }
.vzr-modal__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.vzr-modal--error .vzr-btn:not(.vzr-btn--ghost) { background: #cf0202; border-color: #cf0202; color: #fff !important; }
.vzr-modal--error .vzr-btn:not(.vzr-btn--ghost):hover { background: #a80000; border-color: #a80000; box-shadow: 0 6px 24px rgba(207, 2, 2, 0.3); }
@media (max-width: 575px) {
    .vzr-modal__box { padding: 30px 18px 22px; }
    .vzr-modal__actions .vzr-btn { width: 100%; }
}
@media print { .vzr-modal { display: none !important; } }

/* --- walidacja pol --- */
.vzr .has-error .vzr-input,
.vzr .has-error .vzr-file,
.vzr .has-error .vzr-type__box,
.vzr .vzr-products.has-error .vzr-product { border-color: #cf0202 !important; }
.vzr .has-error .vzr-input:focus { box-shadow: 0 0 0 3px rgba(207, 2, 2, 0.2); }
.vzr .has-error > .vzr-label,
.vzr .has-error > .vzr-radios label,
.vzr .has-error .vzr-check { color: #ff9a9a; }
.vzr-field-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    animation: vzr-shake 0.3s ease;
}
.vzr-field-error::before { content: '!'; flex: 0 0 16px; height: 16px; border-radius: 50%; background: #cf0202; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
[data-field="type"] > .vzr-field-error, .vzr-products > .vzr-field-error { margin-top: 12px; }
@keyframes vzr-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* --- produkty / rodzaje juz zgloszone --- */
.vzr-product.is-blocked { opacity: 0.55; }
.vzr-product.is-blocked .vzr-check { cursor: not-allowed; }
.vzr .vzr-product__note { color: #fbc800 !important; font-weight: 600; }
.vzr-type.is-blocked { cursor: not-allowed; opacity: 0.55; }
.vzr-type.is-blocked .vzr-type__box small { color: #fbc800; }

/* --- modal bledu serwera: kontakt --- */
.vzr-modal__contact { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.vzr-modal__contact a {
    display: block;
    padding: 10px 14px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fbc800 !important;
    font-weight: 700;
    text-decoration: none;
}
.vzr-modal__contact a:hover { border-color: #fbc800; }

/* motyw wyrownuje etykiety formularzy do prawej */
.vzr .vzr-label, .vzr .vzr-field, .vzr .vzr-help, .vzr .vzr-field-error { text-align: left; }

/* --- zamowienie z kompletem zgloszen --- */
.vzr-done__list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vzr-done__list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #1a1a1a; border: 1px solid #3a3a3a; border-radius: 8px; padding: 12px 16px; }
.vzr-done__list .vzr-status { margin-top: 6px; }
.vzr-history-link--done { color: #999 !important; font-weight: 600; }
@media (max-width: 575px) { .vzr-done__list li { flex-direction: column; align-items: flex-start; } }
