/* ── WC Return Plugin – Frontend styles ─────────────────────────────────────── */

/* Przycisk "Odstąp od umowy" przy zamówieniu */
.wcrp-return-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 18px;
    background: #fff8f0;
    border: 1px solid #f0c070;
    border-radius: 6px;
}

.wcrp-btn-return {
    background: #e44c4c !important;
    color: #fff !important;
    border-color: #c03030 !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.wcrp-btn-return:hover {
    background: #c03030 !important;
}

.wcrp-return-cta small {
    color: #666;
    font-size: 13px;
}

/* ── Formularz ─────────────────────────────────────────────────────────────── */

.wcrp-form-wrap {
    max-width: 680px;
}

.wcrp-info {
    padding: 12px 16px;
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    margin-bottom: 24px;
}

.wcrp-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.wcrp-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.wcrp-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.wcrp-row label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.wcrp-input,
.wcrp-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.wcrp-readonly {
    background: #f5f5f5;
    color: #666;
    cursor: default;
}

.wcrp-textarea {
    resize: vertical;
    min-height: 90px;
}

/* Produkty */
.wcrp-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcrp-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.wcrp-item-row:hover {
    background: #f9f9f9;
    border-color: #bbb;
}

.wcrp-item-row:has(.wcrp-checkbox:checked) {
    background: #eef6ff;
    border-color: #2196f3;
}

.wcrp-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.wcrp-item-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.wcrp-item-qty {
    font-size: 13px;
    color: #777;
}

.wcrp-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.wcrp-hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

/* Akcje */
.wcrp-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.wcrp-btn-submit {
    padding: 11px 22px !important;
    font-size: 15px !important;
}

.wcrp-btn-cancel {
    color: #666 !important;
}

.wcrp-legal {
    font-size: 12px;
    color: #888;
    margin-top: 16px;
    line-height: 1.5;
}

/* Oznaczenia */
.wcrp-required { color: #e44c4c; margin-left: 2px; }
.wcrp-optional { font-size: 12px; color: #888; font-weight: 400; }

/* Wynik / komunikat */
.wcrp-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wcrp-notice.success {
    background: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #2e7d32;
}

.wcrp-notice.error {
    background: #fce4ec;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

/* Odznaki statusów */
.wcrp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.wcrp-badge--warning { background: #fff3cd; color: #856404; }
.wcrp-badge--info    { background: #cfe2ff; color: #0a58ca; }
.wcrp-badge--error   { background: #f8d7da; color: #842029; }
.wcrp-badge--success { background: #d1e7dd; color: #0f5132; }

/* Spinner */
.wcrp-btn-submit.loading {
    opacity: .7;
    pointer-events: none;
    position: relative;
}

@media (max-width: 600px) {
    .wcrp-return-cta { flex-direction: column; align-items: flex-start; }
    .wcrp-actions     { flex-direction: column; }
    .wcrp-btn-submit  { width: 100%; text-align: center; }
}

/* Przycisk "Zwrot" w tabeli listy zamówień */
.woocommerce-orders-table .wcrp_return a,
.woocommerce-MyAccount-orders .wcrp_return a {
    background-color: #e44c4c !important;
    color: #fff !important;
    border-color: #c03030 !important;
}

.woocommerce-orders-table .wcrp_return a:hover,
.woocommerce-MyAccount-orders .wcrp_return a:hover {
    background-color: #c03030 !important;
}
