/* EXIF viewer: the answer, the summary and every field of a photo on one side, the file, the copy without
   metadata and the export on the other.
   The layout of the two sides is the shared one of the photo tools (.pst-photo in assets/css/tools.css).
   ========================================================================== */

.pst-ex__result {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* The answer to the question of the page, in one box. */
.pst-ex__answer {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--pst-line);
	border-radius: 16px;
	background: var(--pst-tint, #F4F1EA);
}

.pst-ex__answer--alert {
	border-color: #F1C9BE;
	background: #FBEAE5;
}

.pst-ex__answer-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--pst-white, #FFF);
}

.pst-ex__answer--alert .pst-ex__answer-icon {
	color: #8A2A17;
}

.pst-ex__answer-copy {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.pst .pst-ex__answer-title {
	font-family: var(--pst-display);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.pst .pst-ex__answer-value {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

/* Links to a map: they open another website, so they say so. */
.pst .pst-ex__links {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pst-ex__maps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

.pst .pst-ex__map {
	color: var(--pst-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pst-ex__map::after {
	content: " ↗";
}

.pst-ex__map-note {
	color: var(--pst-muted);
	font-size: 13px;
}

/* The summary: groups of names and values. */
.pst-ex__summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 12px;
}

.pst-ex__group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid var(--pst-line);
	border-radius: 16px;
}

.pst-ex__group--alert {
	border-color: #F1C9BE;
}

.pst .pst-ex__group-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-family: var(--pst-body, inherit);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.pst-ex__group--alert .pst-ex__group-title {
	color: #8A2A17;
}

.pst .pst-ex__list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.pst-ex__item {
	display: grid;
	grid-template-columns: minmax(0, 9em) minmax(0, 1fr);
	gap: 2px 12px;
}

.pst .pst-ex__item dt {
	color: var(--pst-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pst .pst-ex__item dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* Every field, by its technical name, in a table that filters as one types. */
.pst-ex__all {
	border-top: 0;
}

.pst-ex__all summary > span {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0 6px;
}

.pst-ex__count {
	color: var(--pst-muted);
	font-weight: 500;
}

.pst-ex__all-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-bottom: 6px;
}

.pst .pst-ex__filter {
	position: relative;
	display: block;
}

.pst-ex__filter .pst-icon {
	position: absolute;
	top: 50%;
	left: 12px;
	color: var(--pst-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.pst .pst-ex__filter .pst-input {
	width: 100%;
	padding-left: 40px;
}

.pst-ex__table-wrap {
	max-height: 520px;
	overflow: auto;
	border: 1px solid var(--pst-line);
	border-radius: 12px;
}

.pst .pst-ex__table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.45;
}

.pst .pst-ex__table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 8px 12px;
	border-bottom: 1px solid var(--pst-line);
	background: var(--pst-white, #FFF);
	color: var(--pst-muted);
	font-size: 13px;
	font-weight: 600;
	text-align: left;
}

.pst .pst-ex__table th,
.pst .pst-ex__table td {
	padding: 6px 12px;
	border: 0;
	vertical-align: top;
	text-align: left;
}

.pst .pst-ex__table tbody th {
	width: 40%;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	font-weight: 500;
	overflow-wrap: anywhere;
}

.pst .pst-ex__table td {
	overflow-wrap: anywhere;
}

.pst .pst-ex__table tbody tr + tr th,
.pst .pst-ex__table tbody tr + tr td {
	border-top: 1px solid var(--pst-line);
}

.pst .pst-ex__table .pst-ex__block th {
	padding-top: 12px;
	background: var(--pst-tint, #F4F1EA);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
}

/* The file, by its picture and its name. */
.pst-ex__file {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.pst-ex__thumb {
	flex: none;
	width: 64px;
	height: 64px;
	border: 1px solid var(--pst-line);
	border-radius: 12px;
	background: var(--pst-white);
	object-fit: cover;
}

.pst-ex__names {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pst .pst-ex__name {
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pst-ex__verdict {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pst .pst-ex__found {
	font-family: var(--pst-display);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.pst .pst-ex__warn {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: #8A2A17;
	font-size: 15px;
	font-weight: 600;
}

.pst-ex__warn .pst-icon {
	margin-top: 2px;
}

.pst-ex__export {
	flex-wrap: wrap;
}

/* These are laid out as rows or grids, which would show them even when they are switched off. */
.pst .pst-ex__warn[hidden],
.pst .pst-ex__answer[hidden],
.pst .pst-ex__links[hidden],
.pst .pst-ex__summary[hidden],
.pst .pst-ex__table tr[hidden],
.pst .pst-ex__all[hidden] {
	display: none;
}

/* With a photo in, the panel is as tall as what it says: the list beside it may be much longer. */
.pst-ex.is-loaded .pst-photo__panel {
	align-self: start;
}

/* Narrow places: once a photo is in, the file, the verdict and the copy come first, the details after them. */
@container pst (max-width: 840px) {
	.pst-ex.is-loaded .pst-photo__panel {
		order: -1;
	}
}

@container pst (max-width: 450px) {
	.pst-ex__item {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.pst .pst-ex__answer-title,
	.pst .pst-ex__found {
		font-size: 20px;
	}

	.pst-ex__answer {
		padding: 14px;
	}
}

@supports not (container-type: inline-size) {
	@media (max-width: 900px) {
		.pst-ex.is-loaded .pst-photo__panel {
			order: -1;
		}
	}
}
