/*
 * Everyday Kit Business QR Code Generator
 * Every selector is scoped under .ek-business-qr so nothing leaks into
 * the theme, Elementor, other plugins or the WordPress admin.
 */

.ek-business-qr {
	--ek-text: #0f172a;
	--ek-muted: #475569;
	--ek-border: #d9e0ea;
	--ek-border-strong: #b6c1d1;
	--ek-surface: #ffffff;
	--ek-soft: #f5f7fa;
	--ek-primary: #1d4ed8;
	--ek-primary-dark: #1e3a8a;
	--ek-error: #b91c1c;
	--ek-error-bg: #fef2f2;
	--ek-warn: #92400e;
	--ek-warn-bg: #fffbeb;
	--ek-ok: #166534;
	--ek-radius: 12px;
	--ek-radius-sm: 8px;
	display: block;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0;
	color: var(--ek-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
	-webkit-text-size-adjust: 100%;
}

.ek-business-qr *,
.ek-business-qr *::before,
.ek-business-qr *::after {
	box-sizing: border-box;
}

.ek-business-qr [hidden] {
	display: none !important;
}

.ek-business-qr .ek-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Layout */
.ek-business-qr .ek-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

@media (min-width: 900px) {
	.ek-business-qr .ek-layout {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 24px;
	}

	.ek-business-qr .ek-preview-col {
		position: sticky;
		top: 24px;
	}
}

.ek-business-qr .ek-form {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
}

/* Cards */
.ek-business-qr .ek-card {
	margin: 0;
	padding: 20px;
	background: var(--ek-surface);
	border: 1px solid var(--ek-border);
	border-radius: var(--ek-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (max-width: 480px) {
	.ek-business-qr .ek-card {
		padding: 16px;
	}
}

.ek-business-qr .ek-card-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	padding: 0;
	color: var(--ek-text);
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

.ek-business-qr .ek-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ek-primary);
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.ek-business-qr .ek-card-help {
	margin: 0 0 16px;
	padding: 0;
	color: var(--ek-muted);
	font-size: 14px;
}

/* Fields */
.ek-business-qr .ek-field {
	margin: 0 0 14px;
	padding: 0;
}

.ek-business-qr .ek-field:last-child {
	margin-bottom: 0;
}

.ek-business-qr .ek-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: var(--ek-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.ek-business-qr .ek-optional {
	color: var(--ek-muted);
	font-weight: 400;
}

.ek-business-qr .ek-req {
	color: var(--ek-error);
	font-weight: 700;
}

.ek-business-qr input.ek-input,
.ek-business-qr select.ek-select {
	display: block;
	width: 100%;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	background: #ffffff;
	color: var(--ek-text);
	border: 1px solid var(--ek-border-strong);
	border-radius: var(--ek-radius-sm);
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	-webkit-appearance: none;
	appearance: none;
}

.ek-business-qr select.ek-select {
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
}

.ek-business-qr input.ek-input::placeholder {
	color: #64748b;
	opacity: 1;
}

.ek-business-qr input.ek-input[aria-invalid="true"] {
	border-color: var(--ek-error);
	border-width: 2px;
	padding: 9px 11px;
}

.ek-business-qr input.ek-input[type="file"] {
	padding: 8px;
	font-size: 14px;
}

.ek-business-qr input.ek-color {
	display: block;
	width: 100%;
	min-width: 56px;
	height: 44px;
	margin: 0;
	padding: 4px;
	background: #ffffff;
	border: 1px solid var(--ek-border-strong);
	border-radius: var(--ek-radius-sm);
	box-shadow: none;
	cursor: pointer;
}

.ek-business-qr input.ek-range {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0;
	background: transparent;
	accent-color: var(--ek-primary);
	cursor: pointer;
}

.ek-business-qr .ek-range-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ek-business-qr .ek-range-row .ek-range {
	flex: 1 1 auto;
}

.ek-business-qr .ek-range-out {
	flex: 0 0 auto;
	min-width: 64px;
	color: var(--ek-muted);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.ek-business-qr .ek-check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

.ek-business-qr .ek-check input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--ek-primary);
}

.ek-business-qr .ek-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.ek-business-qr .ek-hint {
	margin: 6px 0 0;
	padding: 0;
	color: var(--ek-muted);
	font-size: 13px;
}

.ek-business-qr .ek-hint.ek-field {
	margin: 8px 0 16px;
}

/* Focus states */
.ek-business-qr input:focus-visible,
.ek-business-qr select:focus-visible,
.ek-business-qr button:focus-visible,
.ek-business-qr .ek-check input:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
	box-shadow: none;
}

.ek-business-qr input.ek-input:focus,
.ek-business-qr select.ek-select:focus {
	border-color: var(--ek-primary);
}

/* Messages */
.ek-business-qr .ek-error {
	margin: 6px 0 0;
	padding: 8px 10px;
	background: var(--ek-error-bg);
	color: var(--ek-error);
	border-left: 4px solid var(--ek-error);
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.ek-business-qr .ek-summary {
	margin: 0 0 12px;
	padding: 10px 12px;
	background: var(--ek-error-bg);
	color: var(--ek-error);
	border: 1px solid var(--ek-error);
	border-radius: var(--ek-radius-sm);
	font-size: 14px;
	font-weight: 600;
}

.ek-business-qr .ek-note {
	margin: 8px 0 0;
	padding: 8px 10px;
	background: var(--ek-warn-bg);
	color: var(--ek-warn);
	border-left: 4px solid #d97706;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
}

.ek-business-qr .ek-info {
	margin: 0;
	padding: 12px 14px;
	background: var(--ek-soft);
	color: var(--ek-muted);
	border: 1px solid var(--ek-border);
	border-radius: var(--ek-radius-sm);
	font-size: 14px;
}

.ek-business-qr .ek-info strong {
	color: var(--ek-text);
}

.ek-business-qr .ek-privacy {
	margin: 12px 0 0;
	padding: 0;
	color: var(--ek-muted);
	font-size: 13px;
}

/* Buttons */
.ek-business-qr button.ek-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 10px 18px;
	background: #ffffff;
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	color: #fff;
	box-shadow: 0 8px 18px rgba(79,70,229,.3);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ek-business-qr button.ek-btn:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	color: #fff;
	box-shadow: 0 8px 18px rgba(79,70,229,.3);
}

.ek-business-qr button.ek-btn--primary {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	color: #fff;
	box-shadow: 0 8px 18px rgba(79,70,229,.3);
}

.ek-business-qr button.ek-btn--primary:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	color: #fff;
	box-shadow: 0 8px 18px rgba(79,70,229,.3);
}

.ek-business-qr button.ek-btn--block {
	display: flex;
	width: 100%;
	min-height: 50px;
	font-size: 17px;
}

.ek-business-qr button.ek-btn--small {
	min-height: 44px;
	padding: 8px 14px;
	font-size: 14px;
}

.ek-business-qr button.ek-btn--add {
	margin-top: 4px;
	color: var(--ek-primary);
	border: 2px dashed var(--ek-primary);
	background: #eff4ff;
	font-size: 16px;
}

.ek-business-qr button.ek-btn--add:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	color: #fff;
	box-shadow: 0 8px 18px rgba(79,70,229,.3);
}

.ek-business-qr button.ek-btn[aria-disabled="true"] {
	opacity: 0.6;
	cursor: not-allowed;
}

.ek-business-qr .ek-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Logo */
.ek-business-qr .ek-logo-box {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.ek-business-qr .ek-logo-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 84px;
	height: 84px;
	overflow: hidden;
	background: var(--ek-soft);
	color: var(--ek-muted);
	border: 1px dashed var(--ek-border-strong);
	border-radius: var(--ek-radius-sm);
	font-size: 12px;
	text-align: center;
	line-height: 1.3;
}

.ek-business-qr .ek-logo-preview img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	margin: 0;
	padding: 4px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Social link rows */
.ek-business-qr .ek-links {
	display: grid;
	gap: 12px;
	margin: 0 0 12px;
	padding: 0;
}

.ek-business-qr .ek-link-row {
	display: grid;
	grid-template-columns: 40px minmax(140px, 190px) minmax(0, 1fr) auto;
	grid-template-areas: "icon platform value remove" ". err err err";
	column-gap: 10px;
	align-items: end;
	margin: 0;
	padding: 12px;
	background: var(--ek-soft);
	border: 1px solid var(--ek-border);
	border-radius: var(--ek-radius-sm);
}

.ek-business-qr .ek-link-icon {
	grid-area: icon;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 44px;
	color: var(--ek-primary);
}

.ek-business-qr .ek-link-icon svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ek-business-qr .ek-link-platform {
	grid-area: platform;
	min-width: 0;
}

.ek-business-qr .ek-link-value {
	grid-area: value;
	min-width: 0;
}

.ek-business-qr .ek-link-remove {
	grid-area: remove;
}

.ek-business-qr .ek-link-row .ek-error {
	grid-area: err;
}

@media (max-width: 640px) {
	.ek-business-qr .ek-link-row {
		grid-template-columns: 40px minmax(0, 1fr) auto;
		grid-template-areas:
			"icon platform remove"
			"value value value"
			"err err err";
		row-gap: 10px;
	}

	.ek-business-qr .ek-grid-2 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.ek-business-qr .ek-links-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 10px;
	color: var(--ek-muted);
	font-size: 14px;
}

/* Preview */
.ek-business-qr .ek-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
	margin: 0 0 14px;
	padding: 16px;
	background: var(--ek-soft);
	border: 1px solid var(--ek-border);
	border-radius: var(--ek-radius-sm);
}

.ek-business-qr .ek-canvas {
	display: block;
	width: 100%;
	max-width: 400px;
	height: auto;
	margin: 0 auto;
	padding: 0;
	border: 1px solid var(--ek-border);
	border-radius: 4px;
	box-shadow: none;
	background: #ffffff;
}

.ek-business-qr .ek-empty {
	margin: 0;
	padding: 0 8px;
	color: var(--ek-muted);
	font-size: 15px;
	text-align: center;
}

.ek-business-qr .ek-status {
	margin: 0 0 12px;
	padding: 0;
	color: var(--ek-muted);
	font-size: 14px;
}

.ek-business-qr .ek-status.is-error {
	padding: 10px 12px;
	background: var(--ek-error-bg);
	color: var(--ek-error);
	border-left: 4px solid var(--ek-error);
	border-radius: 4px;
	font-weight: 600;
}

.ek-business-qr .ek-result-name {
	margin: 0 0 4px;
	padding: 0;
	color: var(--ek-text);
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: anywhere;
}

.ek-business-qr .ek-meta {
	display: grid;
	grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
	gap: 6px 14px;
	margin: 12px 0;
	padding: 12px 0;
	border-top: 1px solid var(--ek-border);
	border-bottom: 1px solid var(--ek-border);
	font-size: 14px;
}

.ek-business-qr .ek-meta dt {
	margin: 0;
	padding: 0;
	color: var(--ek-muted);
	font-weight: 600;
}

.ek-business-qr .ek-meta dd {
	margin: 0;
	padding: 0;
	color: var(--ek-text);
	overflow-wrap: anywhere;
}

.ek-business-qr .ek-notes {
	margin: 0 0 12px;
	padding: 0 0 0 18px;
	color: var(--ek-muted);
	font-size: 14px;
}

.ek-business-qr .ek-notes li {
	margin: 0 0 4px;
	padding: 0;
}

.ek-business-qr .ek-swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 4px;
	border: 1px solid #64748b;
	border-radius: 3px;
	vertical-align: -1px;
}

.ek-business-qr .ek-result-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.ek-business-qr .ek-result-actions button.ek-btn:first-child {
	grid-column: 1 / -1;
}

.ek-business-qr .ek-result-actions button.ek-btn {
	width: 100%;
}

.ek-business-qr .ek-static-note {
	margin-top: 14px;
}

.ek-business-qr .ek-noscript {
	margin: 0;
	padding: 12px 14px;
	background: var(--ek-warn-bg);
	color: var(--ek-warn);
	border: 1px solid #d97706;
	border-radius: var(--ek-radius-sm);
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.ek-business-qr button.ek-btn {
		transition: none;
	}
}
