/* ==========================================================================
   LeadsKit — Base form styles (layout, reset, struktur)
   Dipakai oleh semua template.
   ========================================================================== */

.lsk-form-wrapper {
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
}

/* Honeypot anti-spam — disembunyikan dari manusia, tapi tetap ada di DOM
   supaya bot yang mengisi semua input tanpa cek visibility tetap terjebak. */
.lsk-hp-field {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0;
	pointer-events: none;
}

.lsk-form-wrapper *,
.lsk-form-wrapper *::before,
.lsk-form-wrapper *::after {
	box-sizing: border-box;
}

.lsk-form-title {
	margin: 0 0 20px;
}

.lsk-field-group {
	margin-bottom: 18px;
}

.lsk-system-field,
.lsk-condition-hidden {
	display: none !important;
}

.lsk-label {
	display: block;
	margin-bottom: 6px;
}

.lsk-required {
	color: #dc2626;
}

.lsk-input,
.lsk-textarea,
.lsk-select {
	display: block;
	width: 100%;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-clip: padding-box;
}

.lsk-select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	/* Tinggi & line-height dipaksa eksplisit (bukan mengandalkan padding+font-size)
	   agar teks select selalu center secara vertikal di semua browser, kebal
	   terhadap CSS tema situs yang ikut menimpa properti box-model select. */
	height: 44px !important;
	line-height: 44px !important;
	padding: 0 36px 0 14px !important;
}

.lsk-textarea {
	resize: vertical;
	min-height: 96px;
}

.lsk-choice-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lsk-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.lsk-choice input {
	margin: 0;
	flex-shrink: 0;
}

.lsk-file-input {
	padding: 10px 12px;
}

.lsk-rating-scale {
	display: grid;
	grid-template-columns: repeat(var(--lsk-rating-levels, 10), minmax(32px, 1fr));
	gap: 6px;
}

.lsk-rating-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.lsk-rating-option span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	border: 1px solid currentColor;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	opacity: 0.72;
	transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lsk-rating-option input:checked + span,
.lsk-rating-option span:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.08);
}

.lsk-rating-option input:checked + span {
	font-weight: 700;
}

.lsk-consent-choice {
	align-items: flex-start;
	line-height: 1.45;
}

.lsk-error-msg {
	display: none;
	font-size: 13px;
	margin-top: 5px;
}

.lsk-field-group.lsk-error .lsk-error-msg {
	display: block;
}

.lsk-submit-group {
	margin-top: 24px;
}

.lsk-btn-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	font: inherit;
	font-size: 16px;
	cursor: pointer;
	border: 0;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.lsk-btn-icon-wrap {
	display: inline-flex;
	flex-shrink: 0;
}

.lsk-btn-icon-wrap svg {
	width: 18px;
	height: 18px;
	display: block;
}

.lsk-btn-submit:disabled,
.lsk-btn-submit.loading {
	opacity: 0.7;
	cursor: not-allowed;
}

.lsk-success-msg {
	padding: 16px;
	border-radius: 8px;
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
	text-align: center;
}

.lsk-wa-countdown {
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
	text-align: center;
	font-size: 14px;
}

.lsk-form-closed-msg {
	padding: 16px;
	border-radius: 8px;
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #e5e7eb;
	text-align: center;
}

.lsk-form-error {
	padding: 12px 16px;
	border-radius: 8px;
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	margin-bottom: 16px;
	font-size: 14px;
}

/* ==========================================================================
   Tipe pertanyaan ala Google Forms & bagian multi-halaman
   ========================================================================== */

/* Atribut hidden harus menang dari display:flex milik tombol/halaman. */
.lsk-form [hidden] {
	display: none !important;
}

.lsk-form-header {
	margin-bottom: 20px;
}

.lsk-form-header .lsk-form-title {
	margin-bottom: 8px;
}

.lsk-form-header > :last-child {
	margin-bottom: 0;
}

.lsk-form-description,
.lsk-section-description,
.lsk-block-description {
	font-size: 14px;
	line-height: 1.55;
	opacity: 0.85;
	overflow-wrap: anywhere;
}

.lsk-required-note {
	margin: 12px 0 0;
	font-size: 13px;
	color: #dc2626;
}

.lsk-field-desc {
	margin: -2px 0 8px;
	font-size: 13px;
	line-height: 1.5;
	opacity: 0.75;
	overflow-wrap: anywhere;
}

/* Opsi "Lainnya:" dengan isian teks */
.lsk-choice-other {
	align-items: center;
	cursor: default;
}

.lsk-choice-other-label {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.lsk-choice-other-label input {
	margin: 0;
}

.lsk-form-wrapper .lsk-choice-other .lsk-other-input {
	flex: 1;
	width: auto;
	min-width: 0;
	min-height: 0;
	padding: 6px 10px;
	font-size: 14px;
}

/* Skala linier */
.lsk-scale {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px 12px;
}

.lsk-scale-options {
	display: flex;
	flex: 1 1 auto;
	justify-content: space-between;
	gap: 4px;
	min-width: 0;
}

.lsk-scale-option {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 26px;
	cursor: pointer;
	font-size: 14px;
}

.lsk-scale-option input {
	width: 20px;
	height: 20px;
	margin: 0;
	cursor: pointer;
}

.lsk-scale-label {
	padding-bottom: 2px;
	font-size: 13px;
	opacity: 0.8;
}

/* Rating ikon (bintang / hati / jempol) */
.lsk-rating {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	--lsk-rating-color: #f5a623;
}

.lsk-rating-heart { --lsk-rating-color: #e5484d; }
.lsk-rating-thumb { --lsk-rating-color: #2563eb; }

.lsk-rating-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	cursor: pointer;
}

.lsk-rating-item input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.lsk-rating-icon {
	display: flex;
	padding: 2px;
	border-radius: 6px;
	color: var(--lsk-accent, var(--lsk-rating-color));
	transition: transform 0.12s ease;
}

.lsk-rating-icon svg {
	width: 32px;
	height: 32px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linejoin: round;
}

.lsk-rating-item.is-filled .lsk-rating-icon svg,
.lsk-rating-item input:checked + .lsk-rating-icon svg {
	fill: currentColor;
}

.lsk-rating-item:hover .lsk-rating-icon {
	transform: scale(1.08);
}

.lsk-rating-item input:focus-visible + .lsk-rating-icon {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.lsk-rating-num {
	font-size: 12px;
	opacity: 0.7;
}

/* Petak pilihan ganda / kotak centang */
.lsk-grid-scroll {
	max-width: 100%;
	overflow-x: auto;
}

.lsk-grid {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 4px;
	font-size: 14px;
}

.lsk-grid th {
	padding: 8px 6px;
	font-weight: 500;
	text-align: center;
}

.lsk-grid tbody th {
	min-width: 90px;
	text-align: left;
}

.lsk-grid td {
	text-align: center;
}

.lsk-grid-row > * {
	background: rgba(127, 127, 127, 0.07);
}

.lsk-grid-row > :first-child {
	border-radius: 6px 0 0 6px;
}

.lsk-grid-row > :last-child {
	border-radius: 0 6px 6px 0;
}

/* Spesifisitas dinaikkan agar menang dari warna baris milik template. */
.lsk-form .lsk-grid-row.lsk-row-error > * {
	background: rgba(220, 38, 38, 0.1);
}

.lsk-grid-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 8px;
	cursor: pointer;
}

.lsk-grid-cell input {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
}

/* Tanggal (tanpa tahun / dengan waktu) & durasi */
.lsk-date-parts,
.lsk-duration {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.lsk-date-parts > * {
	flex: 1 1 140px;
	width: auto;
}

.lsk-duration-part {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	opacity: 0.9;
}

.lsk-form-wrapper .lsk-duration .lsk-duration-input {
	width: 84px;
	min-width: 0;
	text-align: center;
}

.lsk-duration-sep {
	padding-bottom: 18px;
	font-weight: 700;
}

.lsk-file-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	opacity: 0.7;
}

/* Item tampilan: judul & deskripsi, gambar, video */
.lsk-layout-block {
	margin: 0 0 18px;
}

.lsk-block-title {
	margin-bottom: 6px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.lsk-image-block img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.lsk-image-block.lsk-align-center img { margin: 0 auto; }
.lsk-image-block.lsk-align-right img { margin-left: auto; }

.lsk-video-frame {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 16 / 9;
	background: #000;
}

.lsk-video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.lsk-video-block .lsk-block-description {
	margin-top: 8px;
}

/* Bagian = halaman */
.lsk-section-header {
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(127, 127, 127, 0.25);
}

.lsk-section-title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.3;
}

.lsk-progress {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
	font-size: 13px;
}

.lsk-progress-track {
	flex: 1;
	height: 8px;
	overflow: hidden;
	border-radius: 4px;
	background: rgba(127, 127, 127, 0.2);
}

.lsk-progress-bar {
	display: block;
	height: 100%;
	border-radius: 4px;
	background: var(--lsk-accent, currentColor);
	opacity: 0.85;
	transition: width 0.25s ease;
}

.lsk-progress-text {
	flex-shrink: 0;
	opacity: 0.75;
}

.lsk-submit-group.lsk-has-nav {
	display: flex;
	gap: 12px;
}

.lsk-submit-group.lsk-has-nav .lsk-btn-submit {
	flex: 1;
	width: auto;
}

.lsk-btn-back {
	flex: 0 0 auto;
	padding: 12px 20px;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 15px;
	opacity: 0.8;
	cursor: pointer;
}

.lsk-btn-back:hover {
	opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
	.lsk-form-wrapper {
		max-width: 100%;
	}

	.lsk-form-wrapper .lsk-btn-submit {
		min-width: 0;
		height: auto !important;
		min-height: 48px;
		padding: 12px 14px !important;
		font-size: 14px !important;
		line-height: 1.35;
		white-space: normal !important;
	}

	.lsk-form-wrapper .lsk-btn-text {
		min-width: 0;
		overflow-wrap: anywhere;
		text-align: center;
	}

	.lsk-form-wrapper .lsk-btn-icon-wrap {
		flex: 0 0 auto;
	}

	.lsk-template-fresh .lsk-btn-submit:not(.lsk-btn-has-icon)::after {
		margin-left: 6px !important;
	}

	.lsk-rating-scale {
		grid-template-columns: repeat(5, minmax(36px, 1fr));
	}

	/* Skala linier: label ujung pindah ke atas/bawah agar angka tetap satu baris. */
	.lsk-scale {
		flex-direction: column;
		align-items: stretch;
	}

	.lsk-scale-label-max {
		text-align: right;
	}

	/* Skala sampai 11 opsi (0–10) harus muat tanpa melewati kartu. */
	.lsk-scale-options {
		gap: 0;
	}

	.lsk-scale-option {
		min-width: 0;
	}

	.lsk-rating-icon svg {
		width: 28px;
		height: 28px;
	}
}
