/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.atteks-embroidery-addon {
	margin: 22px 0;
	padding: 18px 20px 22px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.atteks-emb-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}
.atteks-emb-title {
	font-weight: 600;
	font-size: 1em;
	color: #222;
}
.atteks-emb-price {
	font-size: 0.85em;
	font-weight: 600;
	color: #333;
	background: #efefef;
	padding: 2px 10px;
	border-radius: 12px;
}

/* ── Radio row ───────────────────────────────────────────────────────────── */
.atteks-emb-options {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 6px;
}
.atteks-emb-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 0.95em;
}
.atteks-emb-option input[type="radio"] {
	margin: 0;
	cursor: pointer;
}

/* ── Section dividers ────────────────────────────────────────────────────── */
.atteks-emb-logo-section,
.atteks-emb-name-section {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e8e8e8;
}

/* ── Generic field ───────────────────────────────────────────────────────── */
.atteks-emb-field {
	margin-bottom: 18px;
}
.atteks-emb-field > label {
	display: block;
	font-weight: 500;
	font-size: 0.88em;
	margin-bottom: 8px;
	color: #444;
}
.atteks-emb-field input[type="text"] {
	width: 100%;
	max-width: 400px;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	background: #fff;
	color: #333;
}
.atteks-emb-field input[type="text"]:focus {
	outline: none;
	border-color: #888;
	box-shadow: 0 0 0 2px rgba(0,0,0,.06);
}

/* ── Logo upload ─────────────────────────────────────────────────────────── */
.atteks-emb-logo-section > label {
	display: block;
	font-weight: 500;
	font-size: 0.88em;
	margin-bottom: 6px;
	color: #444;
}
.atteks-emb-hint {
	font-weight: 400;
	color: #999;
	font-size: 0.85em;
	margin-left: 4px;
}
#atteks_logo_file { display: block; margin-top: 4px; }
.atteks-emb-file-feedback { margin-top: 6px; font-size: 0.85em; min-height: 18px; }
.atteks-emb-file-feedback.atteks-emb-error { color: #c62828; }
.atteks-emb-file-feedback.atteks-emb-ok    { color: #2e7d32; }

/* ── Font trigger button ─────────────────────────────────────────────────── */
.atteks-emb-font-trigger {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	max-width: 400px;
	padding: 10px 14px;
	border: 2px dashed #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	transition: border-color .15s, background .15s;
	font-size: 0.95em;
	color: #888;
}
.atteks-emb-font-trigger:hover {
	border-color: #aaa;
	background: #fafafa;
}
.atteks-emb-font-trigger.has-selection {
	border-style: solid;
	border-color: #333;
	color: #222;
}
.atteks-emb-trigger-sample {
	font-size: 1.25em;
	display: none; /* shown by JS after selection */
	line-height: 1.2;
}
.atteks-emb-trigger-placeholder {
	font-size: 0.9em;
	color: #aaa;
}

/* ── Modal overlay ───────────────────────────────────────────────────────── */
.atteks-emb-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}
body.atteks-modal-open {
	overflow: hidden;
}

/* ── Modal box ───────────────────────────────────────────────────────────── */
.atteks-emb-modal {
	background: #fff;
	border-radius: 10px;
	width: 100%;
	max-width: 760px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	overflow: hidden;
}

/* ── Modal header ────────────────────────────────────────────────────────── */
.atteks-emb-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 14px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}
.atteks-emb-modal-title {
	font-weight: 600;
	font-size: 1em;
	color: #222;
}
.atteks-emb-modal-close {
	background: none;
	border: none;
	font-size: 1.4em;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
	transition: color .15s, background .15s;
}
.atteks-emb-modal-close:hover {
	color: #333;
	background: #f0f0f0;
}

/* ── Modal preview input ─────────────────────────────────────────────────── */
.atteks-emb-modal-preview-input {
	padding: 14px 20px 12px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}
.atteks-emb-modal-preview-input input[type="text"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1em;
	color: #333;
	box-sizing: border-box;
}
.atteks-emb-modal-preview-input input[type="text"]:focus {
	outline: none;
	border-color: #888;
	box-shadow: 0 0 0 2px rgba(0,0,0,.07);
}

/* ── Font card grid (inside modal) ──────────────────────────────────────── */
.atteks-emb-font-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
	gap: 10px;
	overflow-y: auto;
	padding: 16px 20px 20px;
	flex: 1; /* fills remaining modal height */
}
.atteks-emb-font-card {
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	padding: 14px 10px 10px;
	cursor: pointer;
	background: #fff;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	transition: border-color .15s, box-shadow .15s, background .15s;
	width: 100%;
}
.atteks-emb-font-card:hover {
	border-color: #aaa;
}
.atteks-emb-font-card.selected {
	border-color: #333;
	box-shadow: 0 0 0 2px rgba(0,0,0,.1);
	background: #f5f5f5;
}
.atteks-emb-font-sample {
	font-size: 1.1em;
	line-height: 1.3;
	color: #222;
	word-break: break-word;
	display: block;
}
.atteks-emb-font-label {
	font-size: 0.68em;
	color: #bbb;
	font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif !important;
	display: block;
}

/* ── Thread color swatches ───────────────────────────────────────────────── */
.atteks-emb-color-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 2px;
}
.atteks-emb-color-swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid #e0e0e0;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: border-color .15s, box-shadow .15s;
	position: relative;
}
.atteks-emb-color-swatch[data-hex="#FFFFFF"],
.atteks-emb-color-swatch[data-hex="#FFFDD0"] { border-color: #ccc; }
.atteks-emb-color-swatch:hover  { border-color: #aaa; }
.atteks-emb-color-swatch.selected {
	border-color: #333;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px #333;
}
.atteks-emb-color-swatch .screen-reader-text {
	position: absolute;
	clip: rect(1px,1px,1px,1px);
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.atteks-emb-color-label {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 8px;
	font-size: 0.88em;
	color: #444;
	min-height: 20px;
}
.atteks-emb-color-dot {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid rgba(0,0,0,.15);
	flex-shrink: 0;
}
.atteks-emb-color-name { font-weight: 500; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.atteks-emb-options                  { flex-direction: column; gap: 10px; }
	.atteks-emb-field input[type="text"] { max-width: 100%; }
	.atteks-emb-font-trigger             { max-width: 100%; }
	.atteks-emb-modal                    { max-height: 95vh; border-radius: 8px; }
	.atteks-emb-font-grid                { grid-template-columns: repeat( auto-fill, minmax( 130px, 1fr ) ); gap: 8px; padding: 12px 14px 16px; }
	.atteks-emb-color-swatch             { width: 28px; height: 28px; }
}
