/* LinkatoJobs AI Studio - matches the site's existing palette (indigo/blue
   accent, Inter body copy, serif headings) so it feels native, not bolted on. */

.lais {
	--lais-primary: #404bf2;
	--lais-primary-dark: #2f39c9;
	--lais-bg: #eff2ff;
	--lais-text: #393a56;
	--lais-muted: #6b6d8f;
	--lais-border: #dde1fb;
	--lais-white: #ffffff;
	--lais-danger: #d64545;
	--lais-success: #1f9d55;
	--lais-radius: 10px;

	max-width: 1080px;
	margin: 0 auto;
	padding: 32px 20px 64px;
	color: var(--lais-text);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}

.lais *,
.lais *::before,
.lais *::after {
	box-sizing: border-box;
}

.lais-header h1 {
	font-family: "IBM Plex Serif", Georgia, serif;
	font-size: clamp(28px, 4vw, 38px);
	margin: 0 0 6px;
	color: var(--lais-text);
}

.lais-header p {
	margin: 0 0 24px;
	color: var(--lais-muted);
	font-size: 15px;
}

.lais-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--lais-border);
	padding-bottom: 12px;
}

.lais-tab {
	appearance: none;
	border: 1px solid var(--lais-border);
	background: var(--lais-white);
	color: var(--lais-text);
	padding: 9px 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lais-tab:hover {
	border-color: var(--lais-primary);
}

.lais-tab.is-active {
	background: var(--lais-primary);
	border-color: var(--lais-primary);
	color: #fff;
}

.lais-panel {
	display: none;
	gap: 24px;
	grid-template-columns: 1fr 1fr;
}

.lais-panel.is-active {
	display: grid;
}

@media (max-width: 760px) {
	.lais-panel.is-active {
		grid-template-columns: 1fr;
	}
}

.lais-form {
	background: var(--lais-white);
	border: 1px solid var(--lais-border);
	border-radius: var(--lais-radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lais-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--lais-text);
	display: block;
	margin-bottom: 4px;
}

.lais-textarea {
	width: 100%;
	border: 1px solid var(--lais-border);
	border-radius: 8px;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
	color: var(--lais-text);
	resize: vertical;
	background: var(--lais-bg);
}

.lais-textarea:focus,
.lais-file-input:focus + .lais-dropzone-inner {
	outline: 2px solid var(--lais-primary);
	outline-offset: 1px;
}

.lais-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.lais-field {
	flex: 1;
	min-width: 140px;
}

.lais-ratio-group,
.lais-duration-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lais-chip {
	appearance: none;
	border: 1px solid var(--lais-border);
	background: var(--lais-bg);
	color: var(--lais-text);
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
}

.lais-chip.is-active {
	background: var(--lais-primary);
	border-color: var(--lais-primary);
	color: #fff;
}

.lais-dropzone {
	position: relative;
	border: 1.5px dashed var(--lais-border);
	border-radius: 8px;
	background: var(--lais-bg);
	min-height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.lais-dropzone.is-dragover {
	border-color: var(--lais-primary);
	background: #e4e8ff;
}

.lais-dropzone-inner {
	text-align: center;
	color: var(--lais-muted);
	font-size: 13px;
	padding: 16px;
	pointer-events: none;
}

.lais-dropzone img.lais-preview {
	max-width: 100%;
	max-height: 220px;
	display: block;
	margin: 0 auto;
}

.lais-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.lais-btn {
	appearance: none;
	border: none;
	border-radius: 4px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.lais-btn-primary {
	background: var(--lais-primary);
	color: #fff;
}

.lais-btn-primary:hover {
	background: var(--lais-primary-dark);
}

.lais-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.lais-btn-secondary {
	background: var(--lais-bg);
	color: var(--lais-text);
	border: 1px solid var(--lais-border);
}

.lais-result {
	background: var(--lais-white);
	border: 1px solid var(--lais-border);
	border-radius: var(--lais-radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 220px;
}

.lais-result:empty::before {
	content: "Your result will appear here.";
	color: var(--lais-muted);
	font-size: 13px;
}

.lais-result img,
.lais-result video {
	max-width: 100%;
	border-radius: 8px;
	display: block;
}

.lais-result-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.lais-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--lais-muted);
	font-size: 13px;
}

.lais-spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid var(--lais-border);
	border-top-color: var(--lais-primary);
	animation: lais-spin 0.8s linear infinite;
}

@keyframes lais-spin {
	to {
		transform: rotate(360deg);
	}
}

.lais-progress {
	width: 100%;
	max-width: 220px;
	height: 6px;
	border-radius: 999px;
	background: var(--lais-border);
	overflow: hidden;
}

.lais-progress > span {
	display: block;
	height: 100%;
	width: 30%;
	background: var(--lais-primary);
	animation: lais-indeterminate 1.4s ease-in-out infinite;
}

@keyframes lais-indeterminate {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(400%); }
}

.lais-error {
	color: var(--lais-danger);
	font-size: 13px;
	background: #fdeaea;
	border: 1px solid #f3c6c6;
	border-radius: 6px;
	padding: 8px 12px;
}

.lais-history h2 {
	font-family: "IBM Plex Serif", Georgia, serif;
	font-size: 20px;
	margin: 40px 0 14px;
}

.lais-history-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}

.lais-history-grid:empty::before {
	content: "No generations yet.";
	color: var(--lais-muted);
	font-size: 13px;
}

.lais-history-item {
	border: 1px solid var(--lais-border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--lais-white);
	font-size: 11px;
}

.lais-history-item img,
.lais-history-item video {
	width: 100%;
	height: 110px;
	object-fit: cover;
	display: block;
	background: var(--lais-bg);
}

.lais-history-item .lais-history-meta {
	padding: 6px 8px;
	color: var(--lais-muted);
}

.lais-history-item .lais-history-status {
	text-transform: capitalize;
}

.lais-locked {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40vh;
}

.lais-locked-box {
	text-align: center;
	max-width: 360px;
}

.lais-locked-box h2 {
	font-family: "IBM Plex Serif", Georgia, serif;
}

/* ---------------------------------------------------------------------
 * Compact embed (e.g. the homepage AI Generator section). Same component,
 * same JS, just a smaller/boxed presentation so it reads as one section
 * among others rather than a full dedicated page.
 * ------------------------------------------------------------------- */

.lais-compact {
	max-width: 960px;
	background: var(--lais-white);
	border: 1px solid var(--lais-border);
	border-radius: 20px;
	padding: 36px 28px 32px;
	margin: 8px auto 48px;
	box-shadow: 0 12px 32px rgba(64, 75, 242, 0.08);
}

.lais-compact .lais-header {
	text-align: center;
}

.lais-compact .lais-header h2 {
	font-family: "IBM Plex Serif", Georgia, serif;
	font-size: clamp(22px, 3vw, 28px);
	margin: 0 0 6px;
	color: var(--lais-text);
}

.lais-compact .lais-header p {
	margin: 0 0 22px;
	color: var(--lais-muted);
	font-size: 14px;
}

.lais-compact .lais-tabs {
	justify-content: center;
}

.lais-compact .lais-result {
	min-height: 160px;
	padding: 16px;
}

.lais-compact-footer {
	text-align: center;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--lais-border);
}

@media (max-width: 600px) {
	.lais-compact {
		padding: 24px 16px 24px;
		border-radius: 14px;
	}
}
