/* Customer warranty-claim page (/public_functions/warranty.php). Copied from my_order/style.css, kept apart on purpose. Mobile first. */

* { box-sizing: border-box; }

:root {
	--bg: #f3f4f6;
	--card: #ffffff;
	--line: #e5e7eb;
	--text: #1f2937;
	--muted: #6b7280;
	--accent: #2e7d32;
	--accent-soft: #e8f5e9;
	--warn: #b45309;
	--warn-soft: #fff7ed;
	--info-soft: #eff6ff;
	--radius: 12px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	margin: 0;
	padding: 16px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}

.wrap { max-width: 720px; margin: 0 auto; }

.pagehead { text-align: center; margin: 8px 0 20px; }
.pagehead .shoplogo { max-height: 56px; max-width: 240px; width: auto; display: inline-block; }

h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
p { margin: 0 0 12px; }

.orderhead { margin: 0 0 16px; }

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
	margin-bottom: 14px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.muted { color: var(--muted); font-size: 13px; }
.warn { color: var(--warn); }
.good { color: var(--accent); }

.banner {
	border-radius: 10px;
	padding: 12px 14px;
	margin: 0 0 14px;
	font-size: 14px;
	border: 1px solid var(--line);
	background: var(--info-soft);
}
.banner.warn { background: var(--warn-soft); border-color: #fdba74; color: #7c2d12; }
.banner.info { background: var(--info-soft); border-color: #bfdbfe; color: #1e3a8a; }
.banner.good { background: var(--accent-soft); border-color: #a5d6a7; color: #1b5e20; }

.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

button, .btn {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 11px 18px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}
.btn.secondary, button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: #b91c1c; }
button.secondary.danger { background: #fff; color: #b91c1c; border-color: #b91c1c; }
.btn:hover, button:hover { filter: brightness(0.95); }
button[disabled] { opacity: 0.5; cursor: default; }
button.small { padding: 6px 12px; font-size: 13px; font-weight: 600; margin: 0; }

/* Forms */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=number], textarea, select {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #c7cad1;
	border-radius: 8px;
	font-size: 16px;
	font-family: inherit;
	background: #fff;
}
textarea { min-height: 80px; resize: vertical; }
input[type=number] { max-width: 120px; }
form button { margin-top: 16px; width: 100%; }
@media (min-width: 640px) {
	input[type=text], input[type=email] { max-width: 360px; }
	form button { width: auto; }
}
.hint { color: var(--muted); font-size: 12px; margin-top: 3px; }
.required::after { content: " *"; color: var(--warn); }
.radios label, .checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: normal; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.radios label:last-child, .checks label:last-child { border-bottom: 0; }
.radios input, .checks input { margin-top: 4px; flex: 0 0 auto; }
.inline-radios { display: flex; gap: 18px; margin-top: 4px; }
.inline-radios label { display: flex; gap: 6px; align-items: center; font-weight: normal; margin: 0; padding: 0; border: 0; }

/* Product lines */
table.lines { width: 100%; border-collapse: collapse; }
table.lines td { border-bottom: 1px solid var(--line); padding: 10px 4px; vertical-align: top; }
table.lines tr:last-child td { border-bottom: 0; }
table.lines td.img { width: 56px; padding-left: 0; }
table.lines td.img img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
table.lines td.act { text-align: right; white-space: nowrap; }
table.lines td.act button { margin: 0; }
.pname { font-weight: 600; line-height: 1.3; font-size: 14px; }
.psku { color: var(--muted); font-size: 12px; margin-top: 2px; }

.badge {
	display: inline-block;
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 999px;
	margin-top: 6px;
	background: var(--accent-soft);
	color: var(--accent);
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: #1e3a8a; }

@media (max-width: 639px) {
	table.lines, table.lines tbody { display: block; }
	table.lines tr { display: flex; flex-wrap: wrap; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
	table.lines tr:last-child { border-bottom: 0; }
	table.lines td { display: block; border: 0; padding: 0; }
	table.lines td.img { flex: 0 0 56px; }
	table.lines td.desc { flex: 1 1 calc(100% - 56px); min-width: 0; }
	table.lines td.act { flex: 1 1 100%; text-align: left; margin: 8px 0 0 56px; }
}

/* Claim card */
.claim-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.claim-item:first-of-type { border-top: 0; padding-top: 0; }
.claim-item img.thumb { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: 0 0 56px; }
.claim-body { flex: 1 1 auto; min-width: 0; }
.claim-body .answers { font-size: 13px; margin-top: 4px; }
.claim-body .answers div { padding: 1px 0; }
.claim-body .answers span { color: var(--muted); }
.claim-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.claim-photos img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.claim-item .btnrow { margin-top: 8px; }
.claim-item .btnrow form { margin: 0; }
.claim-item .btnrow button { margin: 0; }
.sendform textarea { max-width: none; }
.sent-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sent-list li:last-child { border-bottom: 0; }
.sent-list { list-style: none; margin: 0; padding: 0; }

/* Dialogs */
dialog {
	border: 0;
	border-radius: var(--radius);
	padding: 22px;
	width: calc(100% - 32px);
	max-width: 520px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.25);
	position: relative;
}
dialog::backdrop { background: rgba(0,0,0,0.45); }
dialog form button { width: auto; margin-top: 0; }
dialog .btnrow { margin-top: 18px; }
dialog h2 { padding-right: 36px; }
dialog input[type=text], dialog input[type=email] { max-width: none; }
.dlg-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.dlg-close:hover { color: var(--text); background: var(--line); }
.dlg-product { display: flex; gap: 12px; align-items: center; padding: 10px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dlg-product img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; flex: 0 0 48px; }
.dlg-section { display: none; }
.dlg-section.show { display: block; }
.parcel-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: normal; margin: 0; cursor: pointer; }
.parcel-row input { margin-top: 4px; }
.parcel-row .pmeta { font-size: 12px; color: var(--muted); }
.parcel-row .onway { color: var(--warn); font-size: 12px; font-weight: 600; }
.photo-existing { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.photo-existing label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: normal; font-size: 11px; margin: 0; padding: 0; border: 0; }
.photo-existing img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
input[type=file] { font-size: 14px; max-width: 100%; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; flex: 0 0 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: var(--muted); font-size: 13px; }
.test { padding: 10px 0; border-bottom: 1px solid var(--line); }
.test:last-child { border-bottom: 0; }
.test .ttext { font-size: 14px; margin-bottom: 6px; }
.test .inline-radios label { font-size: 13px; }
@media (max-width: 639px) {
	dialog { margin: auto 16px 0; width: calc(100% - 32px); max-width: none; border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; overflow-y: auto; }
	.inline-radios { flex-wrap: wrap; gap: 10px 16px; }
}

.help p { margin: 0; font-size: 14px; }
