/* ============================================
   DYsign Support — frontend styles
   Scoped under #dysup-root so theme CSS can't bleed in.
   ============================================ */

#dysup-root {
	--sup-orange: #ff5a1f;
	--sup-orange-hover: #e64e17;
	--sup-orange-soft: #fff0eb;
	--sup-bg: #F2F2F2;
	--sup-card: #ffffff;
	--sup-border: #d4d4d4;
	--sup-border-soft: #e5e5e5;
	--sup-text: #1a1a1a;
	--sup-text-muted: #555555;
	--sup-text-faint: #999999;
	--sup-green: #16a34a;
	--sup-red: #dc2626;
	--sup-red-soft: #fee2e2;
	--sup-radius: 12px;
	--sup-radius-sm: 8px;

	max-width: 760px;
	margin: 0 auto;
	padding: 24px 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--sup-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
#dysup-root * { box-sizing: border-box; }
#dysup-root [hidden] { display: none !important; }
#dysup-root h1, #dysup-root h2, #dysup-root h3 {
	font-family: inherit; margin: 0;
	letter-spacing: -0.015em;
}

.dysup-header { text-align: center; margin-bottom: 28px; }
.dysup-logo { display: block; margin: 0 auto 16px; height: 40px; width: auto; object-fit: contain; }
.dysup-header h1 {
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-weight: 700;
	margin-bottom: 8px;
	line-height: 1.3;
}
.dysup-header h1 span { color: var(--sup-orange); font-weight: 500; }
.dysup-lead {
	color: var(--sup-text-muted);
	font-size: 0.95rem;
	max-width: 520px;
	margin: 0 auto;
}
.dysup-lead strong { color: var(--sup-text); }

.dysup-card {
	background: var(--sup-card);
	border: 1px solid var(--sup-border);
	border-radius: var(--sup-radius);
	padding: 28px 32px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
@media (max-width: 600px) { .dysup-card { padding: 20px 18px; } }

.dysup-row { margin-bottom: 18px; }
.dysup-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 580px) { .dysup-row-2 { grid-template-columns: 1fr; } }

.dysup-field { margin-bottom: 18px; }
.dysup-field > label {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 4px;
	color: var(--sup-text);
}
.dysup-req { color: var(--sup-orange); font-weight: 700; margin-left: 2px; }
.dysup-hint {
	font-size: 0.82rem;
	color: var(--sup-text-muted);
	margin-bottom: 6px;
}

.dysup-field input[type=text],
.dysup-field input[type=tel],
.dysup-field input[type=email],
.dysup-field input[type=url],
.dysup-field textarea,
.dysup-field select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font-size: 0.95rem;
	font-family: inherit;
	color: var(--sup-text);
	background: var(--sup-card);
	border: 1px solid var(--sup-border);
	border-radius: var(--sup-radius-sm);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.dysup-field input:focus,
.dysup-field textarea:focus,
.dysup-field select:focus {
	outline: none;
	border-color: var(--sup-orange);
	box-shadow: 0 0 0 3px rgba(255,90,31,0.12);
}
.dysup-field textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.dysup-field.is-error input,
.dysup-field.is-error textarea {
	border-color: var(--sup-red);
	box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.dysup-error { display: none; color: var(--sup-red); font-size: 0.82rem; margin-top: 6px; font-weight: 500; }
.dysup-field.is-error .dysup-error { display: block; }
.dysup-char-counter {
	font-size: 0.75rem;
	color: var(--sup-text-faint);
	margin-top: 4px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Priority chips */
.dysup-priority-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}
.dysup-priority-chip {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	border: 1.5px solid var(--sup-border);
	border-radius: var(--sup-radius-sm);
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--sup-text-muted);
	background: var(--sup-card);
	transition: all 0.15s;
	user-select: none;
}
.dysup-priority-chip input { display: none; }
.dysup-priority-chip:hover { border-color: var(--chip-color); color: var(--chip-color); }
.dysup-priority-chip:has(input:checked) {
	background: var(--chip-color);
	border-color: var(--chip-color);
	color: #fff;
}

/* File upload */
.dysup-file-drop {
	display: block;
	border: 2px dashed var(--sup-border);
	border-radius: var(--sup-radius);
	padding: 22px 18px;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s;
	background: #fafafa;
}
.dysup-file-drop:hover, .dysup-file-drop.is-drag {
	border-color: var(--sup-orange);
	background: var(--sup-orange-soft);
}
.dysup-file-drop input[type=file] { display: none; }
.dysup-file-icon { font-size: 24px; margin-bottom: 4px; }
.dysup-file-text { font-size: 0.9rem; font-weight: 600; }
.dysup-file-hint { font-size: 0.78rem; color: var(--sup-text-muted); margin-top: 4px; }
.dysup-link { color: var(--sup-orange); text-decoration: underline; }
.dysup-file-list {
	margin-top: 10px;
	display: flex; flex-direction: column; gap: 6px;
}
.dysup-file-row {
	display: flex; align-items: center; gap: 8px;
	font-size: 0.82rem;
	background: #fafafa;
	border: 1px solid var(--sup-border-soft);
	padding: 7px 12px;
	border-radius: 6px;
}
.dysup-file-row strong { color: var(--sup-text); }
.dysup-file-row .dysup-file-size { color: var(--sup-text-muted); }
.dysup-file-row button {
	margin-left: auto;
	border: none; background: none;
	color: var(--sup-red);
	font-size: 0.78rem; cursor: pointer; font-weight: 600;
}

/* Buttons */
.dysup-actions { margin-top: 20px; }
.dysup-btn {
	padding: 0.85rem 1.8rem;
	border-radius: var(--sup-radius-sm);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	border: 1px solid var(--sup-border);
	background: var(--sup-card);
	color: var(--sup-text);
}
.dysup-btn:hover { background: #f5f5f5; }
.dysup-btn-primary {
	background: var(--sup-orange);
	color: #fff;
	border-color: var(--sup-orange);
	width: 100%;
}
.dysup-btn-primary:hover {
	background: var(--sup-orange-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(255,90,31,0.25);
}
.dysup-btn-primary:disabled {
	background: var(--sup-text-faint);
	border-color: var(--sup-text-faint);
	cursor: not-allowed; opacity: 0.6;
	transform: none; box-shadow: none;
}

/* Thanks state */
.dysup-thanks { text-align: center; padding: 16px 0; }
.dysup-thanks-icon {
	width: 64px; height: 64px;
	background: var(--sup-green); color: #fff;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 28px;
	margin-bottom: 20px;
	box-shadow: 0 8px 20px rgba(22,163,74,0.3);
}
.dysup-thanks h2 { font-size: 1.7rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.dysup-thanks-lead { color: var(--sup-text-muted); margin-bottom: 22px; }
.dysup-ticket-num {
	background: var(--sup-orange-soft);
	border: 2px solid var(--sup-orange);
	border-radius: var(--sup-radius);
	padding: 16px 20px;
	display: inline-block;
	margin-bottom: 24px;
}
.dysup-ticket-num-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--sup-text-muted);
	font-weight: 600;
}
.dysup-ticket-num-value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--sup-orange);
	margin-top: 4px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}
.dysup-thanks-steps {
	background: #fafafa;
	border-radius: var(--sup-radius);
	padding: 18px 22px;
	text-align: left;
	max-width: 480px;
	margin: 0 auto;
	font-size: 0.92rem;
}
.dysup-thanks-steps ul { margin: 8px 0 12px; padding-left: 22px; }
.dysup-thanks-steps li { margin: 6px 0; }
.dysup-thanks-fine {
	color: var(--sup-text-muted);
	font-size: 0.82rem;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--sup-border-soft);
}

/* Lookup status display */
.dysup-status-row {
	display: flex; justify-content: space-between; align-items: flex-start;
	gap: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--sup-border-soft);
	margin-bottom: 16px;
}
.dysup-status-num {
	font-size: 0.85rem;
	color: var(--sup-text-muted);
	font-variant-numeric: tabular-nums;
}
.dysup-status-subject { font-size: 1.2rem; font-weight: 700; margin-top: 2px; }
.dysup-status-pill {
	padding: 6px 14px;
	background: var(--sup-orange-soft);
	color: var(--sup-orange);
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.85rem;
	white-space: nowrap;
}
.dysup-status-pill[data-status="nieuw"]          { background: #dbeafe; color: #2563eb; }
.dysup-status-pill[data-status="in_behandeling"] { background: #fef3c7; color: #d97706; }
.dysup-status-pill[data-status="wacht_op_klant"] { background: #ede9fe; color: #7c3aed; }
.dysup-status-pill[data-status="opgelost"]       { background: #d1fae5; color: #059669; }
.dysup-status-pill[data-status="gesloten"]       { background: #f3f4f6; color: #6b7280; }

.dysup-status-meta {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px 20px;
	color: var(--sup-text-muted);
	font-size: 0.88rem;
}
.dysup-status-meta strong { color: var(--sup-text); }
@media (max-width: 580px) { .dysup-status-meta { grid-template-columns: 1fr; } }

.dysup-status-timeline {
	display: flex; flex-direction: column; gap: 10px;
}
.dysup-timeline-item {
	display: flex; gap: 12px;
	padding: 10px 14px;
	background: #fafafa;
	border-radius: 8px;
	border-left: 3px solid var(--sup-orange);
}
.dysup-timeline-item.is-status { border-left-color: #2563eb; }
.dysup-timeline-icon { width: 22px; text-align: center; color: var(--sup-text-muted); }
.dysup-timeline-meta { font-size: 0.78rem; color: var(--sup-text-muted); }
.dysup-timeline-content { font-size: 0.92rem; margin-top: 2px; }

.dysup-status-footer {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--sup-border-soft);
	color: var(--sup-text-muted);
	font-size: 0.85rem;
	text-align: center;
}

.dysup-footer {
	text-align: center;
	color: var(--sup-text-faint);
	font-size: 0.78rem;
	padding: 20px 16px 8px;
}
