/* Winery Integration admin. Scoped to .wict so nothing leaks into other screens. */

.wict {
	--wict-accent: #8a1c3f;
	--wict-accent-dark: #6d1532;
	--wict-accent-tint: #fbf1f4;
	--wict-ink: #1d2327;
	--wict-muted: #646970;
	--wict-line: #dcdcde;
	--wict-ok: #0f7b3f;
	--wict-ok-bg: #e7f6ed;
	--wict-warn: #8a5a00;
	--wict-warn-bg: #fcf4e3;
	--wict-todo: #a02325;
	--wict-todo-bg: #fcebea;
	color: var(--wict-ink);
	max-width: 1280px;
}

.wict-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin: 12px 0 16px;
}

.wict .wict-title {
	font-size: 23px;
	font-weight: 600;
	margin: 0 0 4px;
	padding: 0;
}

.wict-subtitle {
	margin: 0;
	color: var(--wict-muted);
	font-size: 14px;
}

.wict-version {
	color: var(--wict-muted);
	font-size: 12px;
	white-space: nowrap;
}

.wict-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 1px solid var(--wict-line);
	margin-bottom: 20px;
}

.wict-nav__item {
	padding: 10px 14px;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	color: var(--wict-muted);
	text-decoration: none;
	font-weight: 500;
}

.wict-nav__item:hover,
.wict-nav__item:focus {
	color: var(--wict-ink);
	box-shadow: none;
}

.wict-nav__item.is-current {
	color: var(--wict-accent);
	border-bottom-color: var(--wict-accent);
}

.wict-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 24px;
	align-items: start;
}

@media (max-width: 1100px) {
	.wict-layout {
		grid-template-columns: 1fr;
	}
}

.wict-card {
	background: #fff;
	border: 1px solid var(--wict-line);
	border-radius: 8px;
	padding: 20px 24px;
	margin-bottom: 20px;
}

.wict-card h2 {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px;
}

.wict-card h3 {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 8px;
}

.wict-card p {
	font-size: 13px;
	line-height: 1.6;
}

.wict-card--accent {
	border-color: var(--wict-accent);
	background: var(--wict-accent-tint);
}

.wict-card--hero p {
	font-size: 14px;
	max-width: 70ch;
}

.wict-callout {
	background: var(--wict-warn-bg);
	border-left: 4px solid #dba617;
	padding: 12px 16px;
	margin-bottom: 20px;
	border-radius: 4px;
	font-size: 13px;
}

.wict-help {
	color: var(--wict-muted);
	font-size: 12px;
	line-height: 1.5;
	margin: 6px 0 0;
}

.wict-field {
	margin-bottom: 16px;
}

.wict-field > label:not(.wict-toggle) {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.wict-field input[type="text"],
.wict-field input[type="password"],
.wict-field input[type="number"],
.wict-field select {
	max-width: 420px;
	width: 100%;
}

.wict-field input[type="color"] {
	width: 64px;
	height: 36px;
	padding: 2px;
}

.wict-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0 16px;
}

.wict-two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 16px 0;
}

@media (max-width: 782px) {
	.wict-two {
		grid-template-columns: 1fr;
	}
}

/* Toggle switch */
.wict-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 500;
}

.wict-toggle input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.wict-toggle__ui {
	flex: 0 0 auto;
	width: 36px;
	height: 20px;
	border-radius: 10px;
	background: #c3c4c7;
	position: relative;
	transition: background-color 0.15s ease;
}

.wict-toggle__ui::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s ease;
}

.wict-toggle input:checked + .wict-toggle__ui {
	background: var(--wict-accent);
}

.wict-toggle input:checked + .wict-toggle__ui::after {
	transform: translateX(16px);
}

.wict-toggle input:focus-visible + .wict-toggle__ui {
	outline: 2px solid var(--wict-accent);
	outline-offset: 2px;
}

.wict-field--toggle .wict-help {
	margin-left: 46px;
}

/* Buttons */
.wict .button.wict-button,
.wict .button-primary.wict-button {
	background: var(--wict-accent);
	border-color: var(--wict-accent);
	color: #fff;
}

.wict .button.wict-button:hover,
.wict .button.wict-button:focus {
	background: var(--wict-accent-dark);
	border-color: var(--wict-accent-dark);
	color: #fff;
}

.wict .button.wict-button-secondary {
	border-color: var(--wict-accent);
	color: var(--wict-accent);
}

/* Status pills */
.wict-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	white-space: nowrap;
	background: #f0f0f1;
	color: var(--wict-muted);
}

.wict-pill--ok {
	background: var(--wict-ok-bg);
	color: var(--wict-ok);
}

.wict-pill--warn {
	background: var(--wict-warn-bg);
	color: var(--wict-warn);
}

.wict-pill--todo {
	background: var(--wict-todo-bg);
	color: var(--wict-todo);
}

/* Checklist */
.wict-checklist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wict-checklist__row {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 12px 0;
	border-top: 1px solid #f0f0f1;
	margin: 0;
}

.wict-checklist__row:first-child {
	border-top: 0;
}

.wict-checklist__row > .wict-pill {
	justify-self: start;
}

.wict-checklist__body strong {
	display: block;
	margin-bottom: 2px;
}

.wict-checklist__body span {
	color: var(--wict-muted);
	font-size: 13px;
}

@media (max-width: 600px) {
	.wict-checklist__row {
		grid-template-columns: 1fr;
	}
}

.wict-steps {
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: wict-step;
}

.wict-steps li {
	counter-increment: wict-step;
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 4px 16px;
	align-items: center;
	padding: 12px 0 12px 36px;
	border-top: 1px solid #f0f0f1;
}

.wict-steps li::before {
	content: counter(wict-step);
	position: absolute;
	left: 0;
	top: 12px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wict-accent-tint);
	color: var(--wict-accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 22px;
	text-align: center;
}

.wict-steps li strong {
	grid-column: 1;
}

.wict-steps li span {
	grid-column: 1;
	color: var(--wict-muted);
}

.wict-steps li .button {
	grid-column: 2;
	grid-row: 1 / span 2;
}

.wict-table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 16px;
}

.wict-table th,
.wict-table td {
	text-align: left;
	padding: 8px 8px 8px 0;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
}

.wict-ticks {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wict-ticks li {
	position: relative;
	padding-left: 20px;
	margin-bottom: 6px;
}

.wict-ticks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 6px;
	width: 8px;
	height: 4px;
	border-left: 2px solid var(--wict-accent);
	border-bottom: 2px solid var(--wict-accent);
	transform: rotate(-45deg);
}

.wict-widget-list,
.wict-codes {
	margin: 8px 0 0 18px;
	list-style: disc;
}

.wict-details summary {
	cursor: pointer;
	font-weight: 600;
	margin-top: 8px;
}

/* Brand preview */
.wict-preview {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	margin-top: 8px;
	border: 1px dashed var(--wict-line);
	border-radius: 8px;
}

.wict-preview__button {
	background: var(--wict-brand);
	color: var(--wict-brand-text);
	border-radius: var(--wict-radius);
	padding: 10px 18px;
	font-weight: 600;
}

.wict-preview__link {
	color: var(--wict-brand);
	text-decoration: underline;
}

/* Sidebar offers */
.wict-offer {
	background: #fff;
	border: 1px solid var(--wict-line);
	border-radius: 8px;
	padding: 18px 20px;
	margin-bottom: 16px;
}

.wict-offer--pixel {
	border-top: 3px solid var(--wict-accent);
}

.wict-offer--feed {
	border-top: 3px solid #b8860b;
}

.wict-offer--done {
	background: #f6f7f7;
}

.wict-offer__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 11px;
	font-weight: 600;
	color: var(--wict-muted);
	margin: 0 0 6px;
}

.wict .wict-offer__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.35;
}

.wict-offer p {
	font-size: 13px;
	line-height: 1.55;
}

.wict-offer__list {
	margin: 8px 0 12px 18px;
	list-style: disc;
	font-size: 13px;
}

.wict-offer__price {
	font-weight: 600;
	font-size: 13px;
	color: var(--wict-ink);
}

.wict-offer .button {
	margin: 4px 0 8px;
}

.wict-offer__link {
	display: block;
	font-size: 13px;
	margin-top: 4px;
	color: var(--wict-accent);
}

.wict-offer__link:hover,
.wict-offer__link:focus {
	color: var(--wict-accent-dark);
}

.wict [data-wict-show-if][hidden] {
	display: none;
}

.wict-form > .button {
	margin: 0 0 24px;
}
