/**
 * Public component styles
 *
 * Table of contents
 * 1. Foundation and layout
 * 2. Form controls
 * 3. Order and product selectors
 * 4. Notices and declaration evidence
 * 5. History, legal content and permanent access
 * 6. Responsive rules
 */

/* 1. Foundation and layout
-------------------------------------------------------------- */
.rwlwc-wrap {
	--rwlwc-accent: #173faf;
	--rwlwc-text: #172033;
	--rwlwc-muted: #59636e;
	--rwlwc-border: #dce1e7;
	--rwlwc-surface: #f8fafc;
	width: 100%;
	max-width: 960px;
	margin: 24px auto 40px;
	color: var(--rwlwc-text);
}
.rwlwc-wrap, .rwlwc-wrap *, .rwlwc-legal-notice, .rwlwc-legal-notice * { box-sizing: border-box; }
.rwlwc-intro { max-width: 900px; margin-bottom: 24px; }
.rwlwc-muted, .rwlwc-privacy { color: var(--rwlwc-muted); }
.rwlwc-form {
	max-width: 900px;
	padding: 28px;
	border: 1px solid var(--rwlwc-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(27,45,76,.06);
}
.rwlwc-fieldset, .rwlwc-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.rwlwc-fieldset > legend {
	width: 100%;
	margin: 0 0 22px;
	padding: 0 0 12px;
	border-bottom: 1px solid #e6ebf1;
	font-size: 20px;
	font-weight: 700;
}
.rwlwc-grid { display: grid; gap: 20px; }
.rwlwc-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
/* End foundation and layout */

/* 2. Form controls
-------------------------------------------------------------- */
.rwlwc-field { margin: 0 0 20px; }
.rwlwc-field > label, .rwlwc-manual-item label, .rwlwc-account-product > div label {
	display: block;
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 700;
}
.rwlwc-form input[type="text"], .rwlwc-form input[type="email"], .rwlwc-form input[type="number"], .rwlwc-form select, .rwlwc-form textarea {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 9px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	background: #fff;
	color: var(--rwlwc-text);
	box-shadow: none;
}
.rwlwc-form textarea { min-height: 120px; resize: vertical; }
.rwlwc-form .has-error input, .rwlwc-form .has-error textarea { border-color: #b42318; }
.rwlwc-error { display: block; margin-top: 7px; color: #b42318; font-size: 13px; font-weight: 600; }
.rwlwc-choice-group { margin: 0 0 20px; }
.rwlwc-choice-group legend { margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.rwlwc-choice-group label { display: block; margin: 8px 0; }
/* End form controls */

/* 3. Order and product selectors
-------------------------------------------------------------- */
.rwlwc-account-order, .rwlwc-account-items, .rwlwc-manual-items {
	margin: 16px 0 24px;
	padding: 18px;
	border: 1px solid #dce4ee;
	border-radius: 6px;
	background: var(--rwlwc-surface);
}
.rwlwc-order-picker { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.rwlwc-selected-order { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--rwlwc-accent); background: #fff; }
.rwlwc-account-items h3, .rwlwc-manual-items h3 { margin: 0 0 16px; font-size: 18px; }
.rwlwc-account-product {
	display: grid;
	grid-template-columns: 24px minmax(0,1fr) 125px;
	gap: 12px;
	align-items: center;
	margin: 0 0 12px;
	padding: 14px;
	border: 1px solid #dce4ee;
	border-radius: 5px;
	background: #fff;
}
.rwlwc-account-product > label strong, .rwlwc-account-product > label span { display: block; overflow-wrap: anywhere; }
.rwlwc-account-product > label span { margin-top: 3px; color: var(--rwlwc-muted); font-size: 13px; }
.rwlwc-manual-item { display: grid; grid-template-columns: minmax(0,1fr) 130px auto; gap: 12px; align-items: end; margin-bottom: 14px; }
/* End order and product selectors */

/* 4. Notices and declaration evidence
-------------------------------------------------------------- */
.rwlwc-honeypot { display: none !important; }
.rwlwc-declaration { margin: 24px 0 16px; padding: 18px; border-left: 4px solid var(--rwlwc-accent); background: #f4f7ff; }
.rwlwc-declaration p { margin: 8px 0 0; }
.rwlwc-submit { width: 100%; min-height: 48px; font-weight: 700; }
.rwlwc-notice { margin: 16px 0; padding: 14px 16px; border-left: 4px solid #59636e; background: #f4f7ff; }
.rwlwc-notice-error { border-color: #b42318; background: #fef3f2; color: #7a271a; }
.rwlwc-notice-warning { border-color: #dc6803; background: #fffaeb; color: #7a2e0e; }
.rwlwc-notice-success { border-color: #067647; background: #ecfdf3; color: #05603a; }
/* End notices and declaration evidence */

/* 5. History, legal content and permanent access
-------------------------------------------------------------- */
.rwlwc-success dl { display: grid; grid-template-columns: minmax(180px,auto) 1fr; gap: 8px 18px; padding: 18px; border: 1px solid var(--rwlwc-border); background: var(--rwlwc-surface); }
.rwlwc-success dt, .rwlwc-success dd { margin: 0; }
.rwlwc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.rwlwc-history-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.rwlwc-history-heading h2 { margin-top: 0; }
.rwlwc-table-wrap { overflow-x: auto; }
.rwlwc-table { width: 100%; }
.rwlwc-pagination { margin-top: 20px; }
.rwlwc-legal, .rwlwc-legal-notice, .rwlwc-model-card { padding: 24px; border: 1px solid #d8dee6; background: #f8fafc; line-height: 1.65; }
.rwlwc-legal address { padding: 14px; border-left: 4px solid var(--rwlwc-accent); background: #fff; }
.rwlwc-legal-notice { max-width: 960px; margin: 24px auto; }
.rwlwc-model-card { max-width: 760px; margin: 24px 0; }
.rwlwc-footer-access { padding: 12px 20px; text-align: center; }
.rwlwc-footer-access a { font-weight: 700; text-decoration: underline; }
/* End history, legal content and permanent access */

/* 6. Responsive rules
-------------------------------------------------------------- */
@media (max-width: 767px) {
	.rwlwc-wrap { padding-right: 15px; padding-left: 15px; }
	.rwlwc-form { padding: 18px; overflow: hidden; }
	.rwlwc-grid-2, .rwlwc-order-picker { grid-template-columns: 1fr; }
	.rwlwc-account-product { grid-template-columns: 24px minmax(0,1fr); align-items: start; }
	.rwlwc-account-product > div { grid-column: 2; max-width: 150px; }
	.rwlwc-manual-item { grid-template-columns: 1fr 95px; }
	.rwlwc-remove { grid-column: 1 / -1; justify-self: start; }
	.rwlwc-success dl { grid-template-columns: 1fr; }
	.rwlwc-history-heading { flex-direction: column; }
}
/* End responsive rules */
