/* Retragere din Contract — frontend styles */
.rc-widget {
	max-width: 640px;
	margin: 1.5em 0;
	padding: 1.75em;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
.rc-widget * {
	box-sizing: border-box;
}
.rc-title {
	margin: 0 0 .4em;
	font-size: 1.4em;
	line-height: 1.3;
}
.rc-intro,
.rc-help {
	color: #595959;
	margin: 0 0 1em;
}
.rc-deadline {
	font-weight: 600;
	margin: 0 0 1em;
}
.rc-back-link {
	display: inline-block;
	margin-bottom: 1em;
	color: #595959;
	text-decoration: none;
	font-size: .9em;
}
.rc-back-link:hover {
	color: var(--rc-primary, #5d47e2);
	text-decoration: underline;
}

/* Form fields */
.rc-form .rc-field {
	margin: 0 0 1.1em;
}
.rc-form label {
	display: block;
	font-weight: 600;
	margin-bottom: .35em;
}
.rc-form input[type="text"],
.rc-form input[type="email"],
.rc-form input[type="number"],
.rc-form textarea {
	width: 100%;
	max-width: 100%;
	padding: .6em .7em;
	border: 1px solid #d1d1d1;
	border-radius: 5px;
	font-size: 1em;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rc-form input[type="text"]:focus,
.rc-form input[type="email"]:focus,
.rc-form input[type="number"]:focus,
.rc-form textarea:focus {
	outline: none;
	border-color: var(--rc-primary, #5d47e2);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-primary, #5d47e2) 20%, transparent);
}
.rc-checkbox label {
	font-weight: 400;
	display: flex;
	gap: .6em;
	align-items: flex-start;
}
.rc-checkbox input {
	width: auto;
	margin-top: .2em;
	accent-color: var(--rc-primary, #5d47e2);
}

/* Items table */
.rc-items-wrap {
	overflow-x: auto;
	margin: 0 0 1.25em;
}
.rc-items {
	width: 100%;
	border-collapse: collapse;
}
.rc-items th {
	font-size: .85em;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: #777;
	text-align: left;
	padding: 0 .5em .5em;
	border-bottom: 2px solid #e5e5e5;
}
.rc-items td {
	border-bottom: 1px solid #eee;
	padding: .75em .5em;
	text-align: left;
	vertical-align: top;
}
.rc-items tr:last-child td {
	border-bottom: none;
}
.rc-items tr.rc-ineligible {
	opacity: .6;
}
.rc-item-check {
	accent-color: var(--rc-primary, #5d47e2);
}
.rc-reason {
	font-size: 13px;
	color: #b91c1c;
	margin-top: .25em;
}
.rc-item-qty {
	width: 70px !important;
	padding: .4em !important;
}

.rc-fieldset {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1em 1.2em;
	margin: 0 0 1.25em;
	background: #fafafa;
}
.rc-fieldset legend {
	font-weight: 600;
	padding: 0 .4em;
}

/* Buttons */
.rc-button,
.rc-floating-button {
	display: inline-block;
	background: var(--rc-primary, #5d47e2);
	color: #fff !important;
	border: none;
	padding: .7em 1.4em;
	border-radius: 5px;
	cursor: pointer;
	font-weight: 600;
	font-size: 1em;
	text-decoration: none;
	text-align: center;
	transition: filter .15s ease, opacity .15s ease;
}
.rc-button:hover,
.rc-floating-button:hover {
	filter: brightness(.92);
}
.rc-button:disabled,
.rc-is-loading {
	opacity: .65;
	cursor: default;
	filter: none;
}
.rc-floating-button {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

.rc-notice {
	padding: .75em 1em;
	border-radius: 5px;
	margin: 0 0 1.25em;
}
.rc-notice-error {
	background: #fdecea;
	color: #7a1c15;
}

.rc-order-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.rc-order-list li {
	border-bottom: 1px solid #eee;
}
.rc-order-list li:last-child {
	border-bottom: none;
}
.rc-order-list .rc-link,
.rc-order-list .rc-order-link {
	display: block;
	padding: .85em .2em;
	color: #222;
	text-decoration: none;
	border-radius: 4px;
	transition: background .15s ease;
}
.rc-order-list .rc-link:hover,
.rc-order-list .rc-order-link:hover {
	background: #f5f4ff;
	color: var(--rc-primary, #5d47e2);
	padding-left: .6em;
}

.rc-thankyou-notice {
	background: #fef9ec;
	border: 1px solid #f5c96a;
	border-radius: 5px;
	padding: .85em 1.1em;
	margin: 1.5em 0;
}
.rc-thankyou-notice p {
	margin: 0;
}

/* Popup trigger + modal */
.rc-popup-trigger {
	cursor: pointer;
}
.rc-modal[hidden] {
	display: none;
}
/* align-items: flex-start (not center) + overflow-y: auto — with center,
   a dialog taller than the visible viewport (short mobile screens with the
   browser's address bar showing) gets pushed above the top edge with no way
   to scroll up to it, clipping the close button. Anchoring to the top and
   allowing scroll keeps every part of the dialog reachable. */
.rc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	padding: 24px;
}
.rc-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}
.rc-modal-dialog {
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
	background: transparent;
}
.rc-modal-dialog .rc-widget {
	margin: 0;
	min-width: 320px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.rc-loading-placeholder {
	margin: 0;
	color: #777;
}
.rc-modal-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 1;
	width: 32px;
	height: 32px;
	line-height: 1;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #333;
	font-size: 20px;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.rc-modal-close:hover {
	background: #f0f0f0;
}
body.rc-modal-open {
	overflow: hidden;
}

/* Force the plugin's configured color on the WooCommerce My Account
   order-list action (rendered by WooCommerce's own template with its own
   `.woocommerce-button.button` classes, not ours — theme CSS otherwise wins). */
.woocommerce a.button.rc_withdraw,
a.woocommerce-button.button.rc_withdraw {
	background-color: var(--rc-primary, #5d47e2) !important;
	border-color: var(--rc-primary, #5d47e2) !important;
	color: #fff !important;
}
.woocommerce a.button.rc_withdraw:hover,
a.woocommerce-button.button.rc_withdraw:hover {
	background-color: var(--rc-primary, #5d47e2) !important;
	border-color: var(--rc-primary, #5d47e2) !important;
	filter: brightness(.92);
}

@media (max-width: 480px) {
	.rc-widget {
		padding: 1.25em;
	}
	.rc-modal {
		padding: 12px;
	}
}
