/* ═══════════════════════════════════════════════════════════════════════
   ESZK Zwroty — Formularz odstąpienia od umowy
   Prefix: #eszk-zwroty  (izolacja od stylów WordPress/Agricole)
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Wrapper ─────────────────────────────────────────────────────────── */

#eszk-zwroty {
    max-width: 1000px;
    padding: 24px 16px 32px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    margin: 0 auto;
}

#eszk-zwroty *,
#eszk-zwroty *::before,
#eszk-zwroty *::after {
    box-sizing: border-box;
}

/* ─── Karta (główny kontener formularza) ──────────────────────────────── */

#eszk-zwroty .ezw-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 28px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09);
}

/* ─── Baner trybu testowego ───────────────────────────────────────────── */

#eszk-zwroty .ezw-test-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 20px;
    line-height: 1.5;
}

#eszk-zwroty .ezw-test-banner code {
    background: rgba(0,0,0,0.07);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: monospace;
}

/* ─── Sekcje ──────────────────────────────────────────────────────────── */

#eszk-zwroty fieldset.ezw-section {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}

#eszk-zwroty .ezw-section {
    margin-bottom: 24px;
}

#eszk-zwroty .ezw-section-title,
#eszk-zwroty legend.ezw-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #0F252C;
    margin-bottom: 14px;
    padding: 0;
    display: block;
    border-bottom: 2px solid #8BD25A;
    padding-bottom: 6px;
}

/* ─── Pola formularza ─────────────────────────────────────────────────── */

#eszk-zwroty .ezw-field {
    margin-bottom: 16px;
}

#eszk-zwroty .ezw-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

#eszk-zwroty .ezw-req {
    color: #e74c3c;
    margin-left: 2px;
}

#eszk-zwroty .ezw-optional {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-left: 6px;
}

#eszk-zwroty .ezw-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

#eszk-zwroty .ezw-verify-hint {
    background: #f5f9f0;
    border-left: 3px solid #8BD25A;
    padding: 10px 14px;
    margin: 8px 0 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #2c4a17;
    line-height: 1.5;
}

#eszk-zwroty .ezw-verify-hint em {
    color: #5a7a3a;
    font-style: normal;
    font-weight: 700;
    margin: 0 2px;
}

#eszk-zwroty input[type="email"],
#eszk-zwroty input[type="tel"],
#eszk-zwroty input[type="text"],
#eszk-zwroty input[type="number"],
#eszk-zwroty select,
#eszk-zwroty textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    appearance: none;
    -webkit-appearance: none;
}

#eszk-zwroty select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

#eszk-zwroty input:focus,
#eszk-zwroty select:focus,
#eszk-zwroty textarea:focus {
    border-color: #8BD25A;
    box-shadow: 0 0 0 3px rgba(139, 210, 90, 0.18);
}

#eszk-zwroty input::placeholder,
#eszk-zwroty textarea::placeholder {
    color: #bbb;
}

#eszk-zwroty textarea {
    resize: vertical;
    min-height: 80px;
}

/* ─── Checkbox consent ────────────────────────────────────────────────── */

#eszk-zwroty .ezw-field-checkbox {
    margin-top: 20px;
}

#eszk-zwroty .ezw-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

#eszk-zwroty .ezw-checkbox-label input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #8BD25A;
}

#eszk-zwroty .ezw-checkbox-label a {
    color: #2d7a2d;
    text-decoration: underline;
}

/* ─── GDPR note ───────────────────────────────────────────────────────── */

#eszk-zwroty .ezw-gdpr {
    font-size: 12px;
    color: #aaa;
    margin: 12px 0 0;
    line-height: 1.4;
}

#eszk-zwroty .ezw-gdpr a {
    color: #888;
    text-decoration: underline;
}

/* ─── Honeypot ────────────────────────────────────────────────────────── */

#eszk-zwroty .ezw-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ─── Przyciski ───────────────────────────────────────────────────────── */

#eszk-zwroty .ezw-btn {
    display: inline-block;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, opacity 0.18s;
    text-align: center;
    white-space: nowrap;
}

#eszk-zwroty .ezw-btn-primary {
    background: #8BD25A;
    color: #fff;
    width: 100%;
    padding: 15px;
    font-size: 16px;
    letter-spacing: 0.3px;
    margin-top: 8px;
}

#eszk-zwroty .ezw-btn-primary:hover:not(:disabled) {
    background: #7ac04d;
}

#eszk-zwroty .ezw-btn-primary:disabled {
    background: #c0dca8;
    cursor: not-allowed;
}

#eszk-zwroty .ezw-btn-secondary {
    background: #f0f0f0;
    color: #333;
    margin-top: 8px;
}

#eszk-zwroty .ezw-btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

#eszk-zwroty .ezw-btn-secondary:disabled,
#eszk-zwroty .ezw-btn-verified {
    background: #e8f5e1 !important;
    color: #4a8f2e !important;
    cursor: default !important;
}

/* ─── Loading ─────────────────────────────────────────────────────────── */

#eszk-zwroty .ezw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 16px;
    gap: 14px;
}

#eszk-zwroty .ezw-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #e0e0e0;
    border-top-color: #8BD25A;
    border-radius: 50%;
    animation: ezw-spin 0.75s linear infinite;
}

@keyframes ezw-spin {
    to { transform: rotate(360deg); }
}

#eszk-zwroty .ezw-loading p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* ─── Alerty ──────────────────────────────────────────────────────────── */

#eszk-zwroty .ezw-alert {
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

#eszk-zwroty .ezw-alert-error {
    background: #fff;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

#eszk-zwroty .ezw-alert-warning {
    background: #fffdf0;
    border-left: 4px solid #f39c12;
    color: #8a6914;
}

#eszk-zwroty .ezw-alert a {
    color: inherit;
    font-weight: 600;
}

/* ─── Notice (poczta/odbiór) ──────────────────────────────────────────── */

#eszk-zwroty .ezw-notice {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid #3498db;
}

#eszk-zwroty .ezw-notice-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

#eszk-zwroty .ezw-notice-title {
    font-size: 16px;
    font-weight: 700;
    color: #0F252C;
    margin-bottom: 6px;
}

#eszk-zwroty .ezw-notice-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

#eszk-zwroty .ezw-notice-text a {
    color: #2d7a2d;
    font-weight: 600;
}

/* ─── Lista produktów ─────────────────────────────────────────────────── */

#eszk-zwroty .ezw-products-hint {
    font-size: 13px;
    color: #888;
    margin: -8px 0 12px;
}

#eszk-zwroty .ezw-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#eszk-zwroty .ezw-product-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.15s;
}

#eszk-zwroty .ezw-product-item:has(.ezw-product-chk:checked) {
    border-color: #8BD25A;
    background: #f5fbee;
}

#eszk-zwroty .ezw-product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}

#eszk-zwroty .ezw-product-chk {
    width: 18px !important;
    min-width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8BD25A;
}

#eszk-zwroty .ezw-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
    line-height: 1.3;
}

#eszk-zwroty .ezw-product-sku {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

/* ─── Stepper ilości ──────────────────────────────────────────────────── */

#eszk-zwroty .ezw-product-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e8f5e1;
    flex-wrap: wrap;
}

#eszk-zwroty .ezw-qty-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

#eszk-zwroty .ezw-qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

#eszk-zwroty .ezw-qty-btn {
    width: 34px;
    height: 34px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#eszk-zwroty .ezw-qty-btn:hover {
    background: #e5e5e5;
}

#eszk-zwroty .ezw-qty-input {
    width: 52px !important;
    height: 34px;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    border-radius: 0 !important;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    box-shadow: none !important;
    padding: 0 !important;
}

#eszk-zwroty .ezw-qty-input::-webkit-inner-spin-button,
#eszk-zwroty .ezw-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#eszk-zwroty .ezw-qty-max {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

/* ─── Cena za sztukę + wartość linii ──────────────────────────────────── */

#eszk-zwroty .ezw-product-price {
    display: inline-block;
    font-size: 12px;
    color: #2d7a2d;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 8px;
}

#eszk-zwroty .ezw-product-line-total {
    display: inline-block;
    font-size: 12px;
    color: #444;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
}

/* ─── Razem do zwrotu (live total bar) ───────────────────────────────── */

#eszk-zwroty .ezw-return-total {
    margin-top: 12px;
    padding: 14px 16px;
    background: #f0f8e6;
    border: 1px solid #8BD25A;
    border-radius: 8px;
    transition: opacity 0.15s ease;
}

#eszk-zwroty .ezw-return-total-empty {
    opacity: 0.55;
}

#eszk-zwroty .ezw-return-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

#eszk-zwroty .ezw-return-total-label {
    font-size: 14px;
    font-weight: 700;
    color: #0F252C;
}

#eszk-zwroty .ezw-return-total-value {
    font-size: 20px;
    font-weight: 700;
    color: #0F252C;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#eszk-zwroty .ezw-return-total-note {
    margin: 6px 0 0;
    font-size: 11px;
    color: #777;
    font-style: italic;
    line-height: 1.4;
}

/* ─── Walidacja ───────────────────────────────────────────────────────── */

#eszk-zwroty .ezw-validation-msg {
    font-size: 13px;
    color: #e74c3c;
    margin-top: 8px;
    font-weight: 600;
}

/* ─── Ekran sukcesu ───────────────────────────────────────────────────── */

#eszk-zwroty .ezw-success {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.09);
    text-align: center;
}

#eszk-zwroty .ezw-success-icon {
    width: 56px;
    height: 56px;
    background: #8BD25A;
    color: #fff;
    font-size: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

#eszk-zwroty .ezw-success-title {
    font-size: 22px;
    font-weight: 700;
    color: #0F252C;
    margin: 0 0 20px;
}

#eszk-zwroty .ezw-zw-number-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f5fbee;
    border: 2px solid #8BD25A;
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 16px;
}

#eszk-zwroty .ezw-zw-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

#eszk-zwroty .ezw-zw-number {
    font-size: 20px;
    font-weight: 700;
    color: #0F252C;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

#eszk-zwroty .ezw-copy-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    padding: 0;
}

#eszk-zwroty .ezw-copy-btn:hover {
    border-color: #8BD25A;
    color: #4a8f2e;
}

#eszk-zwroty .ezw-success-promise {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin: 0 0 12px;
}

#eszk-zwroty .ezw-success-info {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.5;
}

#eszk-zwroty .ezw-success-contact {
    font-size: 14px;
    color: #555;
    margin: 0;
}

#eszk-zwroty .ezw-success-contact a {
    color: #2d7a2d;
    font-weight: 600;
    text-decoration: none;
}

#eszk-zwroty .ezw-fallback-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #7a6000;
    margin: 12px 0;
    text-align: left;
}

/* ─── Helper: ukryte ──────────────────────────────────────────────────── */

#eszk-zwroty .ezw-hidden {
    display: none !important;
}

/* ─── Responsywność ───────────────────────────────────────────────────── */

@media (max-width: 520px) {
    #eszk-zwroty {
        padding: 16px 10px 24px;
    }

    #eszk-zwroty .ezw-card {
        padding: 20px 16px;
    }

    #eszk-zwroty .ezw-title {
        font-size: 19px;
    }

    #eszk-zwroty .ezw-zw-number-box {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 14px;
    }

    #eszk-zwroty .ezw-zw-number {
        font-size: 18px;
    }

    #eszk-zwroty .ezw-product-sku {
        display: none;
    }

    #eszk-zwroty .ezw-success {
        padding: 24px 16px;
    }
}
