/* llms.txt Generator — builder app UI.
   Loaded after aeo-checker.css and reuses its design tokens (--fire, --ink,
   --cream*, --radius*, --mono, --display) plus shared classes like
   .aeo-input-panel / .aeo-guide* for everything outside #llms-txt-app. */

/* ── Hero visual: llms.txt file card + AI reader orbit ──────────────────────
   Reuses .aeo-hero-orbit sizing and .aeo-hero-orbit__node* hover states from
   aeo-checker.css (enqueued as a dependency); only the file-card face here
   is new. */

.llms-hero-file {
	animation: llms-hero-file-float 6s ease-in-out infinite;
}

@keyframes llms-hero-file-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

.llms-hero-file__filename {
	font-family: var(--mono, monospace);
	font-size: 10px;
	letter-spacing: 0.05em;
	fill: rgba(245, 240, 232, 0.4);
}

.llms-hero-file__line {
	fill: rgba(245, 240, 232, 0.22);
}

.llms-hero-file__line--title {
	fill: rgba(245, 240, 232, 0.55);
}

.llms-hero-file__line--link {
	fill: rgba(232, 82, 26, 0.55);
}

.llms-hero-file__dot {
	fill: var(--fire, #e8521a);
}

@media (prefers-reduced-motion: reduce) {
	.llms-hero-file {
		animation: none;
	}
}

.llms-gen {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

/* ── Step / group headers ───────────────────────────────────────────────── */

.llms-gen__step-head,
.llms-pro-panel__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.llms-gen__step-badge {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--ink, #181410);
	color: var(--cream, #f4efe6);
	font-family: var(--mono, monospace);
	font-size: 12px;
	font-weight: 700;
}

.llms-gen__label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ink-soft, #6b5f55);
}

.llms-gen__step-label {
	margin-bottom: 0;
}

/* ── Mini info tooltips ──────────────────────────────────────────────────── */

.llms-gen__info-tip {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	color: var(--ink-soft, #8a7d70);
	background: rgba(26, 23, 20, 0.06);
	cursor: help;
	position: relative;
}

.llms-gen__info-tip:hover,
.llms-gen__info-tip:focus-visible {
	color: #fff;
	background: var(--fire, #e8521a);
	outline: none;
}

.llms-gen__info-tip::after,
.llms-gen__info-tip::before {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.llms-gen__info-tip::after {
	content: attr(data-tip);
	position: absolute;
	left: 0;
	bottom: calc(100% + 10px);
	transform: translateY(4px);
	background: var(--ink, #181410);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1.45;
	padding: 9px 12px;
	border-radius: 8px;
	width: 240px;
	white-space: normal;
	text-align: left;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
	z-index: 30;
}

.llms-gen__info-tip::before {
	content: '';
	position: absolute;
	left: 8px;
	bottom: 100%;
	transform: translateY(4px);
	border: 6px solid transparent;
	border-top-color: var(--ink, #181410);
	z-index: 30;
}

.llms-gen__info-tip:hover::after,
.llms-gen__info-tip:hover::before,
.llms-gen__info-tip:focus-visible::after,
.llms-gen__info-tip:focus-visible::before {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

@media (max-width: 480px) {
	.llms-gen__info-tip::after {
		width: 200px;
	}
}

.llms-gen__sublabel {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-soft, #6b5f55);
	margin: 14px 0 8px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.llms-gen__box {
	background: #fff;
	border: 1px solid rgba(26, 23, 20, 0.08);
	border-radius: 16px;
	padding: 22px 24px;
	box-shadow: 0 8px 28px rgba(26, 23, 20, 0.06);
}

.llms-gen__group {
	background: #fff;
	border: 1px solid rgba(26, 23, 20, 0.08);
	border-radius: 16px;
	padding: 22px 24px;
	box-shadow: 0 8px 28px rgba(26, 23, 20, 0.06);
}

.llms-gen__sections {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 16px;
}

.llms-gen__sections-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin: 0 0 16px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #faf8f4;
	border: 1px solid rgba(26, 23, 20, 0.06);
}

.llms-gen__sections-pager-meta {
	margin: 0;
	flex: 1 1 auto;
	min-width: 12rem;
	font-size: 13px;
	color: var(--ink-soft, #625850);
}

.llms-gen__sections-pager .llms-gen__btn {
	flex: 0 0 auto;
}

.llms-gen__group .llms-gen__box.llms-gen__section {
	margin: 0;
}

.llms-gen__section {
	background: #fff;
	border: 1px solid var(--cream-dark, rgba(26, 23, 20, 0.12));
	border-radius: var(--radius, 10px);
	padding: 16px 18px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.llms-gen__section:focus-within,
.llms-gen__section:hover {
	border-color: rgba(232, 82, 26, 0.3);
	box-shadow: 0 2px 12px rgba(26, 23, 20, 0.06);
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */

.llms-gen__input,
.llms-gen__textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1.5px solid var(--cream-dark, rgba(26, 23, 20, 0.15));
	border-radius: var(--radius, 8px);
	font-size: 14px;
	font-family: var(--mono, inherit);
	color: var(--ink, #1a1714);
	background: #fff;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.llms-gen__textarea {
	resize: vertical;
	line-height: 1.5;
}

.llms-gen__input:focus,
.llms-gen__textarea:focus {
	border-color: var(--fire, #e8521a);
	box-shadow: 0 0 0 3px rgba(232, 82, 26, 0.1);
}

.llms-gen__input--sm {
	font-size: 13px;
	padding: 9px 11px;
}

.llms-gen__input-icon-wrap {
	position: relative;
	margin-bottom: 4px;
}

.llms-gen__input-icon {
	position: absolute;
	top: 50%;
	left: 13px;
	transform: translateY(-50%);
	color: var(--ink-soft, #8a7d70);
	display: inline-flex;
	pointer-events: none;
}

.llms-gen__input--icon {
	padding-left: 36px;
}

.llms-gen__row {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 12px;
}

/* ── Section title row ──────────────────────────────────────────────────── */

.llms-gen__section-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.llms-gen__section-badge {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--cream-mid, #ece3d5);
	color: var(--ink-soft, #6b5f55);
	font-family: var(--mono, monospace);
	font-size: 11px;
	font-weight: 700;
}

.llms-gen__section-title {
	flex: 1;
	font-weight: 700;
	background: transparent;
	border-color: transparent;
}

.llms-gen__section-title:hover {
	border-color: var(--cream-dark, rgba(26, 23, 20, 0.15));
}

.llms-gen__section-remove {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid transparent;
	color: var(--ink-soft, #9a8d80);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.llms-gen__section-remove:hover {
	background: rgba(207, 46, 46, 0.08);
	border-color: rgba(207, 46, 46, 0.25);
	color: #cf2e2e;
}

/* ── Link rows ───────────────────────────────────────────────────────────── */

.llms-gen__links {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.llms-gen__link-row {
	display: grid;
	grid-template-columns: 1fr 1.5fr 1fr auto;
	gap: 8px;
	align-items: center;
	padding: 6px;
	border-radius: 8px;
	transition: background 0.15s ease;
}

.llms-gen__link-row:hover {
	background: var(--cream-mid, rgba(26, 23, 20, 0.04));
}

.llms-gen__row-remove {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--cream-dark, rgba(26, 23, 20, 0.12));
	color: var(--ink-soft, #9a8d80);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.llms-gen__row-remove:hover {
	background: rgba(207, 46, 46, 0.08);
	border-color: rgba(207, 46, 46, 0.25);
	color: #cf2e2e;
}

.llms-gen__empty-hint {
	font-size: 13px;
	font-style: italic;
	color: var(--ink-soft, #9a8d80);
	margin: 2px 0 4px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.llms-gen__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border: none;
	border-radius: var(--radius, 8px);
	padding: 10px 18px;
	font-family: var(--display, inherit);
	font-size: 14px;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.llms-gen__btn-icon {
	display: inline-flex;
	flex-shrink: 0;
}

.llms-gen__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

.llms-gen__btn--primary {
	background: var(--fire, #e8521a);
	color: #fff;
	border: 2px solid var(--fire, #e8521a);
}

.llms-gen__btn--primary:hover:not(:disabled) {
	background: var(--fire-dark, #c8430f);
	border-color: var(--fire-dark, #c8430f);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(232, 82, 26, 0.3);
}

.llms-gen__btn--secondary {
	background: var(--ink, #181410);
	color: #fff;
	border: 2px solid var(--ink, #181410);
}

.llms-gen__btn--secondary:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(26, 23, 20, 0.22);
}

.llms-gen__btn--ghost {
	background: transparent;
	border: 1.5px dashed var(--cream-dark, rgba(26, 23, 20, 0.28));
	color: var(--ink-mid, #3a3028);
}

.llms-gen__btn--ghost:hover:not(:disabled) {
	border-color: var(--fire, #e8521a);
	border-style: solid;
	color: var(--fire-dark, #c8430f);
	background: rgba(232, 82, 26, 0.05);
}

.llms-gen__btn--danger {
	background: transparent;
	color: #cf2e2e;
	border: 1.5px solid rgba(207, 46, 46, 0.3);
}

.llms-gen__btn--danger:hover:not(:disabled) {
	background: rgba(207, 46, 46, 0.08);
}

.llms-gen__btn--sm {
	padding: 7px 13px;
	font-size: 12.5px;
}

.llms-gen__status {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: var(--ink-soft, #625850);
}

/* ── Preview ("code editor" card) ────────────────────────────────────────── */

.llms-gen__preview-frame {
	border-radius: var(--radius, 10px);
	overflow: hidden;
	border: 1px solid rgba(26, 23, 20, 0.35);
}

.llms-gen__preview-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	background: #241f1a;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.llms-gen__preview-dots {
	display: inline-flex;
	gap: 5px;
	flex-shrink: 0;
}

.llms-gen__preview-dots i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(244, 239, 230, 0.18);
	display: block;
}

.llms-gen__preview-filename {
	font-family: var(--mono, monospace);
	font-size: 12.5px;
	color: var(--cream, #f4efe6);
	opacity: 0.75;
	flex: 1;
}

.llms-gen__preview-bar-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.llms-gen__preview-action {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: transparent;
	border: 1px solid rgba(244, 239, 230, 0.18);
	color: rgba(244, 239, 230, 0.8);
	border-radius: 6px;
	padding: 5px 10px;
	font-family: var(--mono, monospace);
	font-size: 11.5px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.llms-gen__preview-action:hover {
	background: rgba(244, 239, 230, 0.1);
	border-color: rgba(244, 239, 230, 0.32);
	color: #fff;
}

.llms-gen__preview {
	background: var(--ink, #181410);
	color: var(--cream, #f4efe6);
	padding: 18px 20px;
	font-family: var(--mono, monospace);
	font-size: 13px;
	line-height: 1.65;
	white-space: pre-wrap;
	max-height: 400px;
	overflow: auto;
	margin: 0;
	border: none;
	border-radius: 0;
}

.llms-gen__actions {
	display: flex;
	gap: 10px;
	margin-top: 14px;
}

.llms-gen__hint {
	font-size: 12px;
	color: var(--ink-soft, #625850);
	margin: 10px 0 0;
}

.llms-app-panel {
	margin-bottom: 2.5rem;
}

@media (max-width: 720px) {
	.llms-gen__link-row {
		grid-template-columns: 1fr;
	}

	.llms-gen__row {
		flex-direction: column;
		align-items: stretch;
	}

	.llms-gen__row-remove {
		justify-self: flex-end;
	}

	.llms-gen__box,
	.llms-gen__group {
		padding: 16px 14px;
		border-radius: 12px;
	}

	.llms-gen__section {
		padding: 14px;
	}

	.llms-gen__actions {
		flex-direction: column;
	}

	.llms-gen__actions .llms-gen__btn {
		width: 100%;
		justify-content: center;
	}

	.llms-gen__btn--primary {
		min-height: 48px;
	}

	.llms-gen__input,
	.llms-gen__textarea {
		font-size: 16px;
	}

	.llms-gen__step-head {
		margin-bottom: 12px;
		flex-wrap: wrap;
	}

	.llms-app-panel {
		margin-bottom: 1.5rem;
	}
}

/* ── Premium panel: PDF export + weekly sitemap monitoring ─────────────────── */

.llms-pro-panel {
	background: #fff;
	border: 1px solid rgba(26, 23, 20, 0.08);
	box-shadow: 0 8px 28px rgba(26, 23, 20, 0.06);
}

.llms-pro-panel__head {
	margin-bottom: 6px;
}

.llms-pro-panel__head-icon {
	display: inline-flex;
	flex-shrink: 0;
	color: var(--fire, #e8521a);
}

.llms-pro-panel__head-label {
	color: var(--ink, #1a1714);
	font-size: 13px;
}

.llms-pro-panel__lede {
	font-size: 13px;
	color: var(--ink-soft, #625850);
	margin: 4px 0 0;
}

/* ── Collapsed teaser (default state) ────────────────────────────────────── */

.llms-pro-panel__teaser {
	display: flex;
	align-items: center;
	gap: 18px;
}

.llms-pro-panel__teaser[hidden] {
	display: none;
}

.llms-pro-panel__teaser .llms-pro-panel__head-icon {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(232, 82, 26, 0.12);
	align-items: center;
	justify-content: center;
}

.llms-pro-panel__teaser-copy {
	flex: 1;
	min-width: 0;
}

.llms-pro-panel__teaser-btn {
	flex-shrink: 0;
}

.llms-pro-panel__body {
	margin-top: 4px;
}

.llms-pro-panel__body[hidden] {
	display: none;
}

@media (max-width: 640px) {
	.llms-pro-panel__teaser {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.llms-pro-panel__teaser .llms-pro-panel__head-icon {
		margin: 0 auto;
	}

	.llms-pro-panel__teaser-btn {
		align-self: center;
	}
}

.llms-gen__input-icon-wrap .llms-gen__input {
	margin-bottom: 0;
}

.llms-pro-token-status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	margin: 8px 0 12px;
}

.llms-pro-token-status__icon {
	display: inline-flex;
	flex-shrink: 0;
}

.llms-pro-token-status--ok {
	color: #15803d;
}

.llms-pro-token-status--err {
	color: #b91c1c;
}

.llms-pro-token-status--checking {
	color: var(--ink-soft, #6b7280);
}

.llms-pro-panel__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 6px;
	padding-top: 16px;
	border-top: 1px dashed rgba(26, 23, 20, 0.14);
	position: relative;
}

.llms-pro-panel__grid::before {
	content: "";
	position: absolute;
	top: 16px;
	bottom: 0;
	left: 50%;
	border-left: 1px dashed rgba(26, 23, 20, 0.14);
}

.llms-pro-panel__col {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.llms-pro-panel__col-title {
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-soft, #6b5f55);
}

.llms-pro-panel__col .llms-gen__btn {
	align-self: flex-start;
}

.llms-pro-panel__col-hint {
	font-size: 12px;
	color: var(--ink-soft, #8a7d70);
	margin: 0;
}

@media (max-width: 720px) {
	.llms-pro-panel__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.llms-pro-panel__grid::before {
		display: none;
	}
}

.llms-pro-monitor-list {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.llms-pro-monitor-list__heading {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--ink-soft, #6b5f55);
}

.llms-pro-monitor-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 10px;
	border-radius: 6px;
	background: #fff;
	border: 1px solid var(--cream-dark, rgba(26, 23, 20, 0.1));
	font-size: 12px;
}

.llms-pro-monitor-list__url {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.llms-pro-monitor-list__cancel {
	flex-shrink: 0;
	background: none;
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: rgb(185, 28, 28);
	border-radius: 4px;
	padding: 3px 8px;
	font-size: 11px;
	cursor: pointer;
}

.llms-pro-monitor-list__cancel:hover {
	background: rgba(239, 68, 68, 0.08);
}

.llms-pro-panel__upsell {
	margin: 18px 0 0;
	text-align: center;
	font-size: 13px;
	padding-top: 16px;
	border-top: 1px dashed rgba(26, 23, 20, 0.14);
}

.llms-pro-panel__upsell-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--fire-dark, #c8430f);
	font-weight: 700;
	font-family: var(--display, inherit);
	letter-spacing: 0.02em;
	text-decoration: none;
	padding: 8px 4px;
	border-bottom: 1.5px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.llms-pro-panel__upsell-link:hover {
	border-bottom-color: var(--fire, #e8521a);
	color: var(--fire, #e8521a);
}

/* Static Pro / Pass upsell below the builder (mirrors AEO checker soft upsell). */
#llms-txt-page .aeo-pro-upsell--static {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 1.25rem 0 2rem;
	padding: 1rem 1.25rem;
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 8px;
}

#llms-txt-page .aeo-pro-upsell--static .aeo-pro-upsell__icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	background: #22c55e;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

#llms-txt-page .aeo-pro-upsell--static .aeo-pro-upsell__title {
	margin: 0 0 0.35rem;
	font-weight: 700;
	color: #166534;
}

#llms-txt-page .aeo-pro-upsell--static .aeo-pro-upsell__text {
	margin: 0 0 0.5rem;
	font-size: 0.92rem;
	line-height: 1.45;
	color: #14532d;
}

#llms-txt-page .aeo-pro-upsell--static .aeo-pro-upsell__link {
	font-weight: 700;
	color: #166534;
	text-decoration: underline;
	text-underline-offset: 3px;
}
