/* ============================================================
   DTF Custom — Product page upload zone + pricing table
   Follows design-fixes.md §4.5 and §4.6 specs
   ============================================================ */

/* ----- Upload dropzone (§4.6) ----- */
.dtf-upload-zone {
	border: 2px dashed var(--color-border, #e6e6e6);
	border-radius: var(--radius-sm, 8px);
	background: var(--color-bg-soft, #f5f5f5);
	padding: 48px 24px;
	margin: 0 0 24px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
	position: relative;
}

.dtf-upload-zone:hover {
	border-color: var(--color-primary, #f82858);
}

.dtf-upload-zone.dragover,
.dtf-upload-zone.is-dragover {
	border: 2px solid var(--color-primary, #f82858);
	background: var(--color-primary-pale, #ffd6e2);
}

/* Cloud-upload icon badge — brand pink tint (was off-brand blue) */
.dtf-upload-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	background: var(--color-tint, #fff4f7);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-primary, #f82858);
	font-size: 24px;
}

/* Label */
.dtf-upload-zone .dtf-upload-label {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-text, #303030);
	margin: 0 0 4px;
}

.dtf-upload-zone .dtf-upload-label strong {
	font-weight: 700;
}

/* Hint text (also shows selected filename) */
.dtf-upload-zone .dtf-upload-hint {
	font-size: 14px;
	color: var(--color-text-muted, #6b6b6b);
	margin: 0 0 8px;
}

/* File type info */
.dtf-upload-zone .dtf-upload-types {
	font-size: 13px;
	color: var(--color-text-muted, #6b6b6b);
	margin: 0;
}

/* Requirements list */
.dtf-upload-zone .dtf-upload-requirements {
	font-size: 13px;
	color: var(--color-text-muted, #6b6b6b);
	margin: 12px 0 0;
	padding-left: 20px;
	text-align: left;
	list-style: disc;
}

.dtf-upload-zone .dtf-upload-requirements li {
	margin-bottom: 4px;
}

/* Rights text */
.dtf-upload-zone .dtf-upload-rights {
	font-size: 12px;
	color: var(--color-text-muted, #6b6b6b);
	margin-top: 12px;
	font-style: italic;
}

/* Retention notice. Deliberately NOT muted grey like the rights text: the customer must
   actually read that we delete the file, or a reorder becomes "you lost my design". */
.dtf-upload-zone .dtf-upload-retention {
	font-size: 13px;
	line-height: 1.5;
	color: #141414;
	margin-top: 10px;
	padding: 10px 12px;
	background: #fff8fb;
	border-left: 3px solid var(--color-primary, #e5007e);
	border-radius: 4px;
}

/* Hide the native file input — dropzone handles interaction */
.dtf-upload-zone input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ----- Selected-file preview (thumbnail after upload) ----- */
/* [hidden] must beat the display rules below when JS toggles state. */
.dtf-upload-zone [hidden] {
	display: none !important;
}

/* Filled state: solid brand border, left-aligned, no "click me" cursor. */
.dtf-upload-zone.has-file {
	border-style: solid;
	border-color: var(--color-primary, #f82858);
	background: #fff;
	text-align: left;
	cursor: default;
	padding: 20px 24px;
}

.dtf-upload-preview {
	display: flex;
	align-items: center;
	gap: 16px;
	position: relative;
	padding-right: 28px;
}

.dtf-preview-media {
	flex: 0 0 auto;
}

/* Checkerboard behind the thumb so transparent PNG areas are visible. */
.dtf-preview-thumb {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: contain;
	border-radius: var(--radius-sm, 8px);
	border: 1px solid var(--color-border, #e6e6e6);
	background-color: #fff;
	background-image:
		linear-gradient( 45deg, #ececec 25%, transparent 25% ),
		linear-gradient( -45deg, #ececec 25%, transparent 25% ),
		linear-gradient( 45deg, transparent 75%, #ececec 75% ),
		linear-gradient( -45deg, transparent 75%, #ececec 75% );
	background-size: 16px 16px;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

/* Non-image (PDF) tile. */
.dtf-preview-file {
	width: 96px;
	height: 96px;
	border-radius: var(--radius-sm, 8px);
	border: 1px solid var(--color-primary-pale, #ffd6e2);
	background: var(--color-tint, #fff4f7);
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtf-preview-file .dtf-preview-ext {
	font-weight: 800;
	font-size: 20px;
	letter-spacing: 0.05em;
	color: var(--color-primary, #f82858);
}

.dtf-preview-info {
	flex: 1 1 auto;
	min-width: 0;
}

.dtf-preview-status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #1a7f4b;
	margin: 0 0 4px;
}

.dtf-preview-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1a7f4b;
	color: #fff;
	font-size: 11px;
	line-height: 1;
}

.dtf-preview-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text, #303030);
	margin: 0 0 2px;
	word-break: break-all;
}

.dtf-preview-size {
	font-size: 13px;
	color: var(--color-text-muted, #6b6b6b);
	margin: 0 0 10px;
}

.dtf-preview-change {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-primary, #f82858);
	text-decoration: underline;
}

.dtf-preview-change:hover {
	color: var(--color-teal, #0d9488);
}

.dtf-preview-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: var(--color-primary, #f82858);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtf-preview-remove:hover {
	background: #d61f49;
}

/* ----- Pricing / quantity-tier table (§4.5) ----- */
.dtf-pricing-tiers {
	margin: 0 0 24px;
}

.dtf-pricing-tiers h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--color-text, #303030);
}

.dtf-tier-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	border: 1px solid var(--color-border, #e6e6e6);
	border-radius: var(--radius-card, 12px);
	overflow: hidden;
}

.dtf-tier-table th,
.dtf-tier-table td {
	padding: 12px 16px;
	text-align: center;
	border-bottom: 1px solid var(--color-border, #e6e6e6);
	vertical-align: middle;
}

.dtf-tier-table thead th {
	background: var(--color-primary-pale, #ffd6e2);
	color: var(--color-text, #303030);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-bottom: none;
}

/* Unit-price column: emphasised but modest (the un-scoped 32px main-price rule
   used to leak in here and blow the rows up). */
.dtf-tier-table tbody td:last-child {
	color: var(--color-primary, #f82858);
	font-weight: 700;
	font-size: 15px;
}

/* `.dtf-active-tier` is added at RUNTIME by product.js, which highlights the row
   matching the quantity currently in the box — the PHP renderer emits plain <tr>,
   so grepping the templates for this class finds nothing. It is live; do not
   "clean it up". (The theme separately styled a misspelled `.dtf-tier-active`,
   which really was dead and is gone.) */
.dtf-tier-table tbody tr:not(.dtf-active-tier):hover {
	background: var(--color-tint, #fff4f7);
}

.dtf-tier-table tbody tr:last-child td {
	border-bottom: none;
}

.dtf-tier-table tr.dtf-active-tier,
.dtf-tier-table tr.dtf-active-tier td:last-child {
	background: var(--color-primary, #f82858);
	color: #fff;
	font-weight: 700;
}

.dtf-tier-table tr.dtf-active-tier td {
	border-color: var(--color-primary, #f82858);
}
