/**
 * ID upload — checkout block and My Account screen.
 *
 * Deliberately restrained: this sits inside whatever theme the shop runs, so it
 * borrows the theme's font and only paints the things it has to (the type
 * cards, the progress bar and the status badges). Colours are CSS variables so
 * a theme can retune them without overriding every rule.
 */

.sicf-id-upload,
.sicf-id-account {
	--sicf-id-border: #d8dce3;
	--sicf-id-border-active: #2f6f4f;
	--sicf-id-surface: #fff;
	--sicf-id-surface-soft: #f6f7f9;
	--sicf-id-muted: #5c6470;
	--sicf-id-ok: #166534;
	--sicf-id-ok-bg: #e7f6ec;
	--sicf-id-warn: #8a5a00;
	--sicf-id-warn-bg: #fdf4e3;
	--sicf-id-bad: #b42318;
	--sicf-id-bad-bg: #fdecec;
	--sicf-id-radius: 8px;
}

.sicf-id-upload {
	margin: 1.5em 0;
	padding: 1.25em;
	border: 1px solid var(--sicf-id-border);
	border-radius: var(--sicf-id-radius);
	background: var(--sicf-id-surface);
}

.sicf-id-upload__title {
	margin: 0 0 0.5em;
	font-size: 1.1em;
}

.sicf-id-upload__intro {
	margin: 0 0 1em;
	color: var(--sicf-id-muted);
}

.sicf-id-upload__limits {
	display: block;
	font-size: 0.85em;
	color: var(--sicf-id-muted);
}

/* ------------------------------------------------------------ type cards */

.sicf-id-types {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 10px;
	margin: 0 0 1.25em;
	padding: 0;
	border: 0;
}

.sicf-id-types__legend {
	display: block;
	width: 100%;
	margin-bottom: 0.5em;
	padding: 0;
	font-weight: 600;
}

.sicf-id-type {
	display: block;
	margin: 0;
	cursor: pointer;
}

/* The radio stays in the accessibility tree; the card is what you see. */
.sicf-id-type__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.sicf-id-type__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 12px 14px;
	border: 2px solid var(--sicf-id-border);
	border-radius: var(--sicf-id-radius);
	background: var(--sicf-id-surface);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sicf-id-type__input:checked + .sicf-id-type__card {
	border-color: var(--sicf-id-border-active);
	background: var(--sicf-id-ok-bg);
}

.sicf-id-type__input:focus-visible + .sicf-id-type__card {
	outline: 2px solid var(--sicf-id-border-active);
	outline-offset: 2px;
}

.sicf-id-type__icon svg {
	width: 24px;
	height: 24px;
}

.sicf-id-type__label {
	font-weight: 600;
}

.sicf-id-type__description {
	font-size: 0.85em;
	color: var(--sicf-id-muted);
}

/* ---------------------------------------------------------- file inputs */

.sicf-id-files {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	margin-bottom: 1.25em;
}

.sicf-id-file {
	padding: 12px;
	border: 1px dashed var(--sicf-id-border);
	border-radius: var(--sicf-id-radius);
	background: var(--sicf-id-surface-soft);
}

.sicf-id-file.is-uploading {
	border-style: solid;
}

.sicf-id-file__label,
.sicf-id-file label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.sicf-id-file__input {
	max-width: 100%;
}

.sicf-id-file__progress {
	height: 6px;
	margin-top: 10px;
	overflow: hidden;
	border-radius: 3px;
	background: var(--sicf-id-border);
}

.sicf-id-file__bar {
	display: block;
	width: 0;
	height: 100%;
	background: var(--sicf-id-border-active);
	transition: width 0.2s ease;
}

.sicf-id-file__status {
	margin: 8px 0 0;
	font-size: 0.875em;
	color: var(--sicf-id-muted);
	word-break: break-word;
}

.sicf-id-file__status[data-state="error"] {
	color: var(--sicf-id-bad);
}

.sicf-id-file__status[data-state="done"] {
	color: var(--sicf-id-ok);
}

.sicf-id-hint {
	display: block;
	font-size: 0.85em;
	color: var(--sicf-id-muted);
}

.sicf-id-privacy {
	margin: 1em 0 0;
	font-size: 0.85em;
	color: var(--sicf-id-muted);
}

/* -------------------------------------------------------------- badges */

.sicf-id-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	background: var(--sicf-id-surface-soft);
	color: var(--sicf-id-muted);
}

.sicf-id-badge--approved {
	background: var(--sicf-id-ok-bg);
	color: var(--sicf-id-ok);
}

.sicf-id-badge--pending {
	background: var(--sicf-id-warn-bg);
	color: var(--sicf-id-warn);
}

.sicf-id-badge--rejected,
.sicf-id-badge--expired {
	background: var(--sicf-id-bad-bg);
	color: var(--sicf-id-bad);
}

.sicf-id-onfile {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0;
}

/* --------------------------------------------------------- my account */

.sicf-id-list {
	margin: 0 0 2em;
	padding: 0;
	list-style: none;
}

.sicf-id-list__item {
	padding: 16px;
	margin-bottom: 14px;
	border: 1px solid var(--sicf-id-border);
	border-radius: var(--sicf-id-radius);
	background: var(--sicf-id-surface);
}

.sicf-id-list__head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.sicf-id-list__icon svg {
	width: 22px;
	height: 22px;
}

.sicf-id-list__label {
	font-weight: 600;
}

.sicf-id-list__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 0.9em;
	color: var(--sicf-id-muted);
}

.sicf-id-list__links a + a {
	margin-left: 12px;
}

.sicf-id-list__expiry--soon {
	color: var(--sicf-id-warn);
	font-weight: 600;
}

.sicf-id-list__expiry--past {
	color: var(--sicf-id-bad);
	font-weight: 600;
}

.sicf-id-list__reason {
	margin: 10px 0 0;
	padding: 10px 12px;
	border-radius: var(--sicf-id-radius);
	background: var(--sicf-id-bad-bg);
	color: var(--sicf-id-bad);
}

.sicf-id-form {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--sicf-id-border);
}

.sicf-id-form--new {
	padding: 16px;
	border: 1px solid var(--sicf-id-border);
	border-radius: var(--sicf-id-radius);
}

.sicf-id-form__submit {
	margin-top: 10px;
}

@media (max-width: 600px) {
	.sicf-id-types,
	.sicf-id-files {
		grid-template-columns: 1fr;
	}
}
