/* ===================================================================
   Dreptul de Retragere — Frontend v1.1
   Toate stilurile sunt scoped sub .br-wrap pentru a nu interfera
   cu temele WooCommerce.
   =================================================================== */

:root {
	--br-primary:       #111827;
	--br-primary-dark:  #000000;
	--br-success:       #16a34a;
	--br-danger:        #dc2626;
	--br-warning:       #d97706;
	--br-info:          #2563eb;
	--br-text:          #111827;
	--br-text-muted:    #6b7280;
	--br-border:        #e5e7eb;
	--br-surface:       #ffffff;
	--br-bg:            #f9fafb;
	--br-radius:        10px;
	--br-radius-sm:     6px;
	--br-shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
	--br-shadow-md:     0 4px 16px rgba(0,0,0,.08);
	--br-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Wrapper ─────────────────────────────────────── */
.br-wrap {
	font-family: var(--br-font);
	font-size: 15px;
	color: var(--br-text);
	max-width: 680px;
	margin: 0 auto;
	line-height: 1.6;
}

.br-wrap * {
	box-sizing: border-box;
}

/* ── Step indicator ──────────────────────────────── */
.br-steps {
	display: flex;
	align-items: center;
	margin-bottom: 28px;
}

.br-step {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.br-step__dot {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--br-border);
	color: var(--br-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	transition: background .2s, color .2s;
	flex-shrink: 0;
}

.br-step--active .br-step__dot {
	background: var(--br-primary);
	color: #fff;
}

.br-step--done .br-step__dot {
	background: var(--br-success);
	color: #fff;
}

.br-step__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--br-text-muted);
	transition: color .2s;
}

.br-step--active .br-step__label,
.br-step--done .br-step__label {
	color: var(--br-text);
}

.br-step__line {
	flex: 1;
	height: 2px;
	background: var(--br-border);
	margin: 0 14px;
}

/* ── Errors ──────────────────────────────────────── */
.br-errors {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--br-radius-sm);
	padding: 14px 18px;
	margin-bottom: 20px;
	color: var(--br-danger);
	font-size: 14px;
}

.br-errors p {
	margin: 4px 0;
}

/* ── Card ────────────────────────────────────────── */
.br-card {
	background: var(--br-surface);
	border: 1px solid var(--br-border);
	border-radius: var(--br-radius);
	box-shadow: var(--br-shadow-md);
	overflow: hidden;
}

.br-card__head {
	padding: 24px 28px 20px;
	border-bottom: 1px solid var(--br-border);
}

.br-card__title {
	margin: 0 0 4px !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--br-text) !important;
	line-height: 1.3 !important;
}

.br-card__sub {
	margin: 0 !important;
	font-size: 13px !important;
	color: var(--br-text-muted) !important;
}

/* ── Info box ────────────────────────────────────── */
.br-info-box {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: var(--br-radius-sm);
	padding: 14px 18px;
	margin: 20px 28px;
	font-size: 14px;
	color: #1d4ed8;
	line-height: 1.6;
}

.br-info-box p {
	margin: 0;
}

.br-info-box__icon {
	flex-shrink: 0;
	margin-top: 1px;
}

/* ── Fieldset / Options ──────────────────────────── */
.br-fieldset {
	border: none;
	padding: 0 28px;
	margin: 0 0 20px;
}

.br-fieldset__legend {
	font-size: 14px;
	font-weight: 600;
	color: var(--br-text);
	margin-bottom: 12px;
	display: block;
	padding: 0;
}

.br-required {
	color: var(--br-danger);
	margin-left: 3px;
}

/* Radio option cards */
.br-option {
	display: block;
	cursor: pointer;
	margin-bottom: 10px;
}

.br-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.br-option__card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border: 2px solid var(--br-border);
	border-radius: var(--br-radius-sm);
	background: var(--br-surface);
	transition: border-color .15s, background .15s, box-shadow .15s;
	cursor: pointer;
}

.br-option:hover .br-option__card {
	border-color: var(--br-primary);
	box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}

.br-option input[type="radio"]:checked + .br-option__card {
	border-color: var(--br-primary);
	background: #f5f5f5;
	box-shadow: 0 0 0 4px rgba(0,0,0,.08);
}

.br-option__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--br-bg);
	border-radius: 8px;
}

.br-option__text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.br-option__text strong {
	font-size: 15px;
	font-weight: 600;
	color: var(--br-text);
}

.br-option__text small {
	font-size: 13px;
	color: var(--br-text-muted);
}

.br-option__check {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.br-option input[type="radio"]:checked + .br-option__card .br-option__check svg {
	display: none;
}

.br-option input[type="radio"]:checked + .br-option__card .br-option__check::after {
	content: '';
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--br-primary);
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

/* ── Partial items panel ─────────────────────────── */
.br-partial-panel {
	margin: 0 28px 20px;
	border: 1px solid var(--br-border);
	border-radius: var(--br-radius-sm);
	overflow: hidden;
}

.br-partial-panel[hidden] {
	display: none;
}

.br-partial-panel__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--br-text);
	margin: 0 !important;
	padding: 14px 18px;
	background: var(--br-bg);
	border-bottom: 1px solid var(--br-border);
}

.br-items-grid {
	padding: 8px 0;
}

.br-item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--br-border);
}

.br-item-row:last-child {
	border-bottom: none;
}

.br-item-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.br-item-img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	border: 1px solid var(--br-border);
}

.br-item-details {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.br-item-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--br-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.br-item-sku,
.br-item-maxqty {
	font-size: 12px;
	color: var(--br-text-muted);
}

/* Qty controls */
.br-item-qty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.br-qty-label {
	font-size: 11px;
	color: var(--br-text-muted);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.br-qty-ctrl {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid var(--br-border);
	border-radius: var(--br-radius-sm);
	overflow: hidden;
}

.br-qty-btn {
	background: var(--br-bg);
	border: none;
	width: 32px;
	height: 36px;
	font-size: 18px;
	line-height: 1;
	color: var(--br-text);
	cursor: pointer;
	transition: background .1s;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.br-qty-btn:hover {
	background: #e5e7eb;
}

.br-qty-input {
	width: 62px;
	height: 36px;
	border: none;
	border-left: 1px solid var(--br-border);
	border-right: 1px solid var(--br-border);
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--br-text);
	background: #fff;
	-moz-appearance: textfield;
}

.br-qty-input::-webkit-inner-spin-button,
.br-qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

.br-qty-input:focus {
	outline: none;
	background: #f3f4f6;
}

/* ── Reason ──────────────────────────────────────── */
.br-reason-field {
	padding: 0 28px 20px;
}

.br-reason-field__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--br-text);
	margin-bottom: 6px;
}

.br-optional {
	font-weight: 400;
	font-size: 13px;
	color: var(--br-text-muted);
	margin-left: 4px;
}

.br-textarea {
	width: 100%;
	border: 1px solid var(--br-border);
	border-radius: var(--br-radius-sm);
	padding: 12px 14px;
	font-family: var(--br-font);
	font-size: 14px;
	color: var(--br-text);
	line-height: 1.6;
	resize: vertical;
	transition: border-color .15s, box-shadow .15s;
	background: var(--br-surface);
}

.br-textarea:focus {
	outline: none;
	border-color: var(--br-primary);
	box-shadow: 0 0 0 3px rgba(0,0,0,.1);
}

/* ── Buttons (fully independent from WooCommerce) ── */
.br-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 22px;
	border-radius: var(--br-radius-sm);
	font-family: var(--br-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	border: 2px solid transparent;
	text-decoration: none !important;
	transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
	white-space: nowrap;
}

.br-btn:active {
	transform: translateY(1px);
}

.br-btn--primary {
	background: var(--br-primary);
	border-color: var(--br-primary);
	color: #fff !important;
}

.br-btn--primary:hover {
	background: var(--br-primary-dark);
	border-color: var(--br-primary-dark);
	color: #fff !important;
}

.br-btn--confirm {
	background: var(--br-success);
	border-color: var(--br-success);
	color: #fff !important;
}

.br-btn--confirm:hover {
	background: #15803d;
	border-color: #15803d;
	color: #fff !important;
}

.br-btn--ghost {
	background: transparent;
	border-color: var(--br-border);
	color: var(--br-text-muted) !important;
}

.br-btn--ghost:hover {
	border-color: #9ca3af;
	color: var(--br-text) !important;
	background: var(--br-bg);
}

/* ── Form footer ─────────────────────────────────── */
.br-form-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 28px;
	border-top: 1px solid var(--br-border);
	gap: 12px;
}

/* ── Summary (step 2) ────────────────────────────── */
.br-summary {
	padding: 20px 28px;
	border-bottom: 1px solid var(--br-border);
}

.br-summary__row {
	display: flex;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--br-border);
}

.br-summary__row:last-child {
	border-bottom: none;
}

.br-summary__row--full {
	flex-direction: column;
}

.br-summary__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--br-text-muted);
	width: 140px;
	flex-shrink: 0;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.br-summary__value {
	font-size: 15px;
	color: var(--br-text);
}

.br-summary__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.br-summary__items li {
	padding: 4px 0;
	font-size: 14px;
	color: var(--br-text);
	border-bottom: 1px dashed var(--br-border);
}

.br-summary__items li:last-child {
	border-bottom: none;
}

/* ── Notice box (step 2) ─────────────────────────── */
.br-notice-box {
	margin: 20px 28px;
	padding: 16px 18px;
	border-radius: var(--br-radius-sm);
	font-size: 14px;
}

.br-notice-box strong {
	display: block;
	margin-bottom: 8px;
}

.br-notice-box ul {
	margin: 0;
	padding-left: 18px;
}

.br-notice-box li {
	margin-bottom: 4px;
	line-height: 1.6;
}

.br-notice-box--info {
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
}

/* ── Success (step 3) ────────────────────────────── */
.br-card--success {
	text-align: center;
	padding: 48px 32px;
}

.br-success__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}

.br-success__title {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: var(--br-text) !important;
	margin: 0 0 12px !important;
}

.br-success__sub {
	font-size: 15px;
	color: var(--br-text-muted);
	margin: 0 0 28px;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

.br-success__details {
	background: var(--br-bg);
	border: 1px solid var(--br-border);
	border-radius: var(--br-radius-sm);
	padding: 16px 20px;
	margin: 0 auto 28px;
	text-align: left;
	display: block;
	width: 100%;
	max-width: 360px;
}

.br-success__detail-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	font-size: 14px;
	border-bottom: 1px solid var(--br-border);
}

.br-success__detail-row:last-child {
	border-bottom: none;
}

.br-success__detail-row span {
	color: var(--br-text-muted);
}

/* ── Shortcode page ──────────────────────────────── */
.br-shortcode-wrap {
	max-width: 800px;
	margin: 0 auto;
	font-family: var(--br-font);
}

.br-shortcode-wrap * {
	box-sizing: border-box;
}

.br-info-banner {
	display: flex;
	gap: 20px;
	background: linear-gradient(135deg, #f3f4f6, #e9ecef);
	border: 1px solid #d1d5db;
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 28px;
}

.br-info-banner--compact {
	padding: 20px 24px;
}

.br-info-banner__icon {
	font-size: 48px;
	flex-shrink: 0;
	line-height: 1;
}

.br-info-banner__body h2 {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}

.br-info-banner__body p {
	color: #4b5563;
	line-height: 1.7;
	margin: 0 0 14px;
}

.br-faq { margin-top: 28px; }

.br-faq h3 {
	font-size: 17px;
	font-weight: 700;
	color: #111;
	margin-bottom: 12px;
}

.br-faq__item {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 8px;
	overflow: hidden;
}

.br-faq__item summary {
	padding: 14px 18px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	color: #111;
	background: #fafafa;
	display: flex;
	justify-content: space-between;
	align-items: center;
	list-style: none;
}

.br-faq__item summary::-webkit-details-marker { display: none; }

.br-faq__item summary::after {
	content: '+';
	font-size: 20px;
	color: var(--br-primary);
	font-weight: 300;
}

.br-faq__item[open] summary { border-bottom: 1px solid #e5e7eb; }
.br-faq__item[open] summary::after { content: '−'; }

.br-faq__item p {
	padding: 14px 18px;
	margin: 0;
	color: #555;
	font-size: 14px;
	line-height: 1.6;
}

.br-eligible-title {
	font-size: 15px;
	font-weight: 700;
	color: #111;
	margin: 0 0 10px;
}

.br-eligible-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
}

.br-eligible-table th,
.br-eligible-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
	font-size: 14px;
}

.br-eligible-table th {
	background: #f9fafb;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #6b7280;
}

.br-eligible-table tr:last-child td {
	border-bottom: none;
}

.br-days-left {
	display: inline-block;
	background: #dcfce7;
	color: #15803d;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
}

.br-days-left--urgent {
	background: #fee2e2;
	color: #dc2626;
}

.br-btn-withdraw-small {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	background: #dc2626;
	color: #fff !important;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .15s;
}

.br-btn-withdraw-small:hover {
	background: #b91c1c;
}

.br-no-orders {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 18px 22px;
	margin-bottom: 20px;
	font-size: 14px;
}

.br-no-orders p { margin: 4px 0; }

/* ── Button in orders list ───────────────────────── */
.woocommerce a.button.br_withdrawal,
.woocommerce-MyAccount-orders a.button.br_withdrawal {
	background: #dc2626 !important;
	color: #fff !important;
	border-color: #dc2626 !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	padding: 7px 14px !important;
	border-radius: 4px !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	display: inline-block !important;
	text-decoration: none !important;
}

.woocommerce a.button.br_withdrawal:hover,
.woocommerce-MyAccount-orders a.button.br_withdrawal:hover {
	background: #b91c1c !important;
	border-color: #b91c1c !important;
	color: #fff !important;
}

/* ── Shortcode eligible table last column ─────────── */
.br-eligible-table td:last-child {
	text-align: right;
}

/* ── Countdown bar ───────────────────────────────── */
.br-days-bar {
	width: 80px;
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	margin-top: 6px;
	overflow: hidden;
}

.br-days-bar__fill {
	height: 100%;
	border-radius: 2px;
	background: #16a34a;
	transition: width .3s;
}

.br-days-bar__fill--warning {
	background: #d97706;
}

.br-days-bar__fill--urgent {
	background: #dc2626;
}

/* ── Textarea hint ───────────────────────────────── */
.br-textarea-hint {
	font-size: 12px;
	color: var(--br-text-muted);
	margin-top: 6px;
	margin-bottom: 0;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
	.br-wrap {
		font-size: 14px;
	}

	.br-card__head,
	.br-fieldset,
	.br-reason-field,
	.br-info-box,
	.br-notice-box,
	.br-summary {
		padding-left: 18px;
		padding-right: 18px;
	}

	.br-partial-panel {
		margin-left: 18px;
		margin-right: 18px;
	}

	.br-form-footer {
		flex-direction: column-reverse;
		padding: 16px 18px;
	}

	.br-btn {
		width: 100%;
	}

	.br-step__label {
		display: none;
	}

	.br-item-row {
		flex-wrap: wrap;
	}

	.br-summary__label {
		width: 120px;
		font-size: 12px;
	}

	.br-info-banner {
		flex-direction: column;
		gap: 12px;
	}

	.br-info-banner__icon {
		font-size: 36px;
	}
}

/* Link permanent în footer + căutare comandă fără cont */
.br-footer-link { text-align: center; padding: 12px 16px; font-size: 14px; }
.br-footer-link a { font-weight: 600; text-decoration: underline; }
.br-guest-lookup { margin: 24px 0; padding: 28px 32px; }
.br-guest-lookup h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.br-guest-lookup > p { margin: 0 0 20px; }
.br-lookup-form p { margin: 0 0 16px; }
.br-lookup-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.br-lookup-form input[type="text"],
.br-lookup-form input[type="email"] { width: 100%; max-width: 420px; box-sizing: border-box; }
.br-link-button { display: inline-flex; text-decoration: none !important; }
@media (max-width: 600px) {
	.br-guest-lookup { padding: 20px 16px; }
}
.br-order-details-cta { margin: 16px 0; }

/* Pași de ghidare */
.br-steps-guide { counter-reset: brstep; list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 12px; }
.br-steps-guide li { counter-increment: brstep; position: relative; padding: 4px 0 4px 44px; line-height: 1.5; }
.br-steps-guide li::before { content: counter(brstep); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: #111827; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Cerere deja înregistrată */
.br-active-request { margin: 16px 0; padding: 20px 24px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; }
.br-active-request__head { display: flex; gap: 14px; align-items: flex-start; }
.br-active-request__head p { margin: 4px 0 0; color: #4b5563; font-size: 14px; }
.br-active-request__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 32px; height: 32px; border-radius: 50%; background: #16a34a; color: #fff; font-weight: 700; }
.br-active-request__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid #dcfce7; }
.br-active-request__meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; font-weight: 600; }
.br-active-request__meta dd { margin: 4px 0 0; font-weight: 600; }
.br-active-request .br-btn { margin-top: 16px; }
.br-pill-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; background: #fef3c7; color: #92400e; }
.br-pill-status--processing { background: #eef2ff; color: #4338ca; }
.br-pill-status--returned { background: #ecfeff; color: #0e7490; }
