/**
 * Upload your logo: the per-store presentation, and the hover cue on a card.
 *
 * Michael, 2026-09-18 (01:28): *"we just want to display it differently than the
 * Thread Ghost one, but same functionality, same tech."* So there is exactly one
 * markup (inc/logo-drop.php) and exactly one behaviour (assets/tg-logo-preview.js),
 * and a store picks a skin. Nothing below changes what the widget DOES.
 *
 * Loaded after `tg-logo-preview.css`, which owns the widget's shared look and the
 * placed print on the category tiles. This file only re-arranges.
 *
 * ── Why three layouts and not a per-store stylesheet ────────────────────────
 *
 * A per-store sheet is a fork with a filename. Fifty of them is fifty files
 * nobody will keep in step, and the first divergence is invisible because every
 * one of them looks fine on its own store. Three named layouts is a decision a
 * store makes in a dropdown, and a fourth is a pull request everybody sees.
 *
 * `panel` deliberately adds almost nothing: it is what `tg-logo-preview.css`
 * already draws, so ThreadGhost's saved home page renders exactly as it does
 * today with no new rule applied to it.
 */

/* ------------------------------------------------------------------- inline */

/*
 * A row that sits INSIDE a section a store already has — on safetyuniformco it
 * lives in the closing "Ready to put your logo on the crew?" band, so the band
 * keeps its heading and its button and gains a place to act.
 *
 * The dashed box goes; a band inside a band reads as a form on a form. What is
 * left is the mark, the hint and the tools on one line.
 */
.st-logo-drop--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1rem 1.25rem;
	align-items: center;
	justify-content: center;
	min-height: 0;
	/* The band above supplies the breathing room; this only needs to clear the
	   button that follows it inside st-cta. */
	margin: 0 0 1.75rem;
	padding: 1.1rem 1.25rem;
	border-style: solid;
	border-color: var( --wp--preset--color--ti-line, #c9c9c9 );
	border-radius: 4px;
	text-align: left;
}

.st-logo-drop--inline .tg-logo-drop__body {
	flex: 1 1 14rem;
	flex-direction: row;
	align-items: center;
	gap: 0.9rem;
	text-align: left;
}

.st-logo-drop--inline .tg-logo-drop__mark {
	width: 2.75rem;
	height: 2.75rem;
}

.st-logo-drop--inline .tg-logo-drop__tools {
	margin-top: 0;
}

/* Under ~30rem the row is a column anyway, and a left-ragged column under a
   centred heading looks like a mistake rather than a choice. */
@media ( max-width: 30rem ) {
	.st-logo-drop--inline,
	.st-logo-drop--inline .tg-logo-drop__body {
		flex-direction: column;
		text-align: center;
	}
}

/*
 * On an inverted band, and this is not cosmetic.
 *
 * `st-cta` is `ti-bg-inv` — a dark surface. Every colour tg-logo-preview.css
 * gives the widget is tuned for the light one: a near-black border that
 * disappears, a mid-grey hint that fails contrast, and an outline button whose
 * hover fills itself near-black on near-black and takes its own label with it.
 * The hover state is the one that matters: a control that vanishes when you
 * point at it is worse than one that was never legible.
 *
 * Scoped to the band's own generated class rather than to a store, so any
 * inverted section gets it and no store needs a stylesheet.
 */
.has-ti-bg-inv-background-color .st-logo-drop--inline {
	border-color: rgba( 255, 255, 255, 0.28 );
}

.has-ti-bg-inv-background-color .st-logo-drop--inline:hover,
.has-ti-bg-inv-background-color .st-logo-drop--inline:focus-within,
.has-ti-bg-inv-background-color .st-logo-drop--inline.is-dragging {
	border-color: var( --wp--preset--color--ti-fg-alt, #fff );
	background-color: rgba( 255, 255, 255, 0.06 );
}

.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__hint {
	color: var( --wp--preset--color--ti-fg-alt, #fff );
}

.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__mark:not( [style] ) {
	border-color: rgba( 255, 255, 255, 0.28 );
}

.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__btn {
	border-color: var( --wp--preset--color--ti-fg-alt, #fff );
	color: var( --wp--preset--color--ti-fg-alt, #fff );
}

.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__btn:hover,
.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__btn:focus-visible {
	background: var( --wp--preset--color--ti-fg-alt, #fff );
	color: var( --wp--preset--color--ti-bg-inv, #111 );
}

.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__btn:disabled {
	background: transparent;
	color: var( --wp--preset--color--ti-fg-alt, #fff );
}

/* An error has to read on both surfaces. #b3261e on near-black does not. */
.has-ti-bg-inv-background-color .st-logo-drop--inline .tg-logo-drop__error {
	color: #ff8a80;
}

.has-ti-bg-inv-background-color .st-logo-drop--inline input[type="file"]:focus-visible + .tg-logo-drop__body {
	outline-color: var( --wp--preset--color--ti-fg-alt, #fff );
}

/* --------------------------------------------------------------------- rail */

/*
 * Narrow, for a column beside a gallery. Kept dashed — here it IS the invitation
 * and has nothing else in the column competing to be one.
 */
.st-logo-drop--rail {
	gap: 0.6rem;
	min-height: 9rem;
	padding: 1.25rem 1rem;
}

.st-logo-drop--rail .tg-logo-drop__mark {
	width: 3.25rem;
	height: 3.25rem;
}

.st-logo-drop--rail .tg-logo-drop__hint {
	font-size: 0.66rem;
	line-height: 1.5;
}

.st-logo-drop--rail .tg-logo-drop__btn {
	font-size: 0.62rem;
	padding: 0.45rem 0.7rem;
}

/* ------------------------------------------- the cue on a product card */

/*
 * Michael, 2026-09-23 with Diego (02:01): *"that interactivity of hovering and
 * letting people know right away that this can be customized with your logo."*
 *
 * A caption over the thumbnail, on hover and on focus-within. It is a LABEL and
 * not a control: the card is already one link to the product page, where the
 * configurator and the hand-off card live, so the drop stays one click away and
 * this does not put a second click target inside a link — a button nested in an
 * anchor is invalid markup and a real tab-order bug.
 *
 * `:focus-within` is what makes it reachable by keyboard, and coarse pointers
 * get it permanently at the bottom of the file, because a phone has no hover and
 * the whole point is telling someone the garment can be customised.
 */
.st-logo-cue {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	left: 0.5rem;
	z-index: 2;
	padding: 0.4rem 0.55rem;
	border-radius: 2px;
	background: rgba( 0, 0, 0, 0.72 );
	color: #fff;
	font-family: var( --wp--preset--font-family--space-mono, monospace );
	font-size: 0.6rem;
	letter-spacing: 0.07em;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
	opacity: 0;
	transform: translateY( 0.35rem );
	pointer-events: none;
	transition: opacity 200ms ease-out, transform 240ms cubic-bezier( 0.2, 0.7, 0.2, 1 );
}

/* The thumbnail wrapper is the positioning context. It is not relative in the
   ported sheet, so without this the caption anchors to the page. */
.dtla_product .product_thumbnail_wrapper {
	position: relative;
}

.dtla_product:hover .st-logo-cue,
.dtla_product:focus-within .st-logo-cue {
	opacity: 1;
	transform: translateY( 0 );
}

@media ( hover: none ) {
	.st-logo-cue {
		opacity: 1;
		transform: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.st-logo-cue {
		transition: opacity 200ms ease-out;
		transform: none;
	}
}
