/* Hipwee Mini Tools: gaya bersama untuk semua tool.
   Komponen pakai prefix .hmt- dan wrapper <section>, bukan <div>,
   supaya Ad Inserter tidak menghitungnya sebagai paragraf. */

/* ---------- Bingkai + tower ---------- */
.hmt-frame { container-type: inline-size; margin: 24px 0; }
.hmt-frame .hmt-grid { display: block; }
.hmt-frame .hmt-rail { display: none; }

@container (min-width: 1040px) {
	.hmt-frame--rails .hmt-grid { display: grid; grid-template-columns: 160px minmax(0, 640px) 160px; gap: 32px; justify-content: center; align-items: start; }
	.hmt-frame--rails .hmt-rail { display: block; align-self: stretch; }
	.hmt-frame--rails .hmt-rail-in { position: sticky; top: var(--hmt-rail-top, 100px); display: block; width: 160px; min-height: 600px; }
	.hmt-frame--rails .hmt { max-width: none; margin: 0; }
}

/* Template halaman lebar */
.hmt-page { max-width: 1120px; margin: 0 auto; padding: 8px 16px 32px; box-sizing: border-box; }

/* ---------- Token & dasar ---------- */
.hmt {
	--hmt-accent: #F69220;      /* oranye Hipwee */
	--hmt-accent-text: #B85F00; /* oranye tua untuk teks kecil */
	--hmt-accent-soft: #FEF1E4;
	--hmt-ink: #30373F;
	--hmt-muted: #6B6B6B;
	--hmt-line: #ebe8e4;
	--hmt-card: #ffffff;
	--hmt-soft: #f7f5f2;
	--hmt-head-font: "Merriweather Sans", sans-serif;
	--hmt-body-font: Roboto, sans-serif;

	max-width: 640px; margin: 0 auto; padding: 16px; box-sizing: border-box;
	color: var(--hmt-ink); font-family: var(--hmt-body-font); font-size: 16px; line-height: 1.5; text-align: left;
	-webkit-text-size-adjust: 100%;
}
.hmt *, .hmt *::before, .hmt *::after { box-sizing: border-box; }
.hmt section, .hmt [data-b] { display: block; }
.hmt [hidden] { display: none !important; }
.hmt .hmt-title, .hmt h3, .hmt h4, .hmt .hmt-big, .hmt details > summary, .hmt .hmt-tool-name { font-family: var(--hmt-head-font); }
.hmt h3, .hmt h4 { color: var(--hmt-ink); letter-spacing: normal; text-transform: none; }
.hmt button { font: inherit; }

/* ---------- Header ---------- */
.hmt .hmt-head { margin-bottom: 16px; }
.hmt .hmt-brand { display: flex; align-items: center; gap: 10px; }
.hmt .hmt-logo { display: block; width: auto; height: 28px; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.hmt .hmt-tool-name { padding: 1px 0 1px 10px; margin-bottom: 5px; border-left: 1.5px solid #d9d4cd; font-size: 16px; font-weight: 700; line-height: 1.2; color: var(--hmt-ink); }
.hmt .hmt-title { display: block; font-weight: 700; font-size: 24px; line-height: 1.25; margin: 10px 0 6px; padding: 0; color: var(--hmt-ink); letter-spacing: normal; text-transform: none; max-width: none; }
.hmt .hmt-sub { margin: 0; color: var(--hmt-muted); font-size: 15px; }

/* ---------- Kartu & form ---------- */
.hmt .hmt-card { background: var(--hmt-card); border: 1px solid var(--hmt-line); border-radius: 16px; padding: 18px 16px; margin: 0 0 16px; }
.hmt .hmt-card h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0 0 12px; padding: 0; }
.hmt .hmt-field { margin-bottom: 16px; }
.hmt .hmt-field:last-child { margin-bottom: 0; }
.hmt .hmt-label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; color: var(--hmt-ink); }
.hmt .hmt-hint { font-weight: 400; color: var(--hmt-muted); }

.hmt .hmt-money { display: flex; align-items: center; border: 1.5px solid var(--hmt-line); border-radius: 12px; background: var(--hmt-soft); transition: border-color .15s; }
.hmt .hmt-money:focus-within { border-color: var(--hmt-accent); background: #fff; }
.hmt .hmt-money > span { padding: 0 4px 0 14px; font-weight: 600; color: var(--hmt-muted); }
.hmt .hmt-money input { flex: 1; min-width: 0; width: auto; height: auto; margin: 0; border: 0; box-shadow: none; background: transparent; outline: none; font: inherit; font-size: 18px; font-weight: 600; color: var(--hmt-ink); padding: 13px 14px 13px 4px; }

.hmt .hmt-text { width: 100%; height: auto; margin: 0; border: 1.5px solid var(--hmt-line); border-radius: 12px; background: var(--hmt-soft); box-shadow: none; font: inherit; font-size: 16px; padding: 12px 14px; color: var(--hmt-ink); outline: none; }
.hmt .hmt-text:focus { border-color: var(--hmt-accent); background: #fff; }

.hmt .hmt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hmt .hmt-chip { border: 1px solid var(--hmt-line); background: #fff; color: var(--hmt-ink); font-size: 13px; line-height: 1.4; padding: 6px 12px; margin: 0; border-radius: 999px; cursor: pointer; }
.hmt .hmt-chip:hover { border-color: #dcd8d2; background: var(--hmt-soft); }

/* Pilihan berbentuk segmen */
.hmt .hmt-seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 6px; background: var(--hmt-soft); padding: 4px; border-radius: 12px; }
.hmt .hmt-seg label { position: relative; margin: 0; }
.hmt .hmt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.hmt .hmt-seg span { display: block; text-align: center; padding: 8px 2px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--hmt-muted); cursor: pointer; line-height: 1.25; }
.hmt .hmt-seg span small { display: block; font-weight: 400; font-size: 11px; }
.hmt .hmt-seg input:checked + span { background: #fff; color: var(--hmt-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hmt .hmt-seg input:focus-visible + span { outline: 2px solid var(--hmt-accent); }

/* Kotak info & kartu gelap */
.hmt .hmt-tip { margin: 14px 0 0; font-size: 14px; background: var(--hmt-soft); border-radius: 12px; padding: 12px 14px; }
.hmt .hmt-tip b { display: block; margin-bottom: 2px; }
.hmt .hmt-dark { background: var(--hmt-ink); color: #fff; border: 0; }
.hmt .hmt-big { font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }

/* Accordion */
.hmt .hmt-acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.hmt .hmt-acc summary::-webkit-details-marker { display: none; }
.hmt .hmt-acc summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--hmt-muted); border-bottom: 2px solid var(--hmt-muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.hmt .hmt-acc[open] summary::after { transform: rotate(-135deg) translateY(-3px); }

/* ---------- Iklan ----------
   Sengaja tanpa max-height supaya iklan tidak terpotong. */
.hmt .hmt-ad { margin: 24px 0; min-height: 250px; text-align: center; }
.hmt-rail .hmt-ad { margin: 0; min-height: 600px; }
/* Kalau AdSense tidak punya iklan untuk slot ini, sembunyikan ruang kosongnya (cara yang dianjurkan Google). */
.hmt-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.hmt-ad--placeholder { display: grid !important; place-content: center; gap: 4px; min-height: 250px; border: 1.5px dashed #cfcac4; border-radius: 12px; background: #faf9f7; color: #a29d96; font: 13px/1.4 Roboto, sans-serif; text-align: center; padding: 12px; }
.hmt-ad--placeholder small { font-size: 11px; }
.hmt-rail .hmt-ad--placeholder { width: 160px; height: 600px; }

/* ---------- Share ---------- */
.hmt .hmt-share-card h3 { margin: 0 0 14px; font-size: 15px; }
.hmt .hmt-share { display: flex; justify-content: space-between; gap: 6px; }
.hmt .hmt-sh { flex: 1; max-width: 50px; display: flex; align-items: center; gap: 10px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--hmt-ink); cursor: pointer; text-decoration: none; transition: transform .1s, background .15s, border-color .15s; }
.hmt .hmt-sh:active { transform: scale(.95); }
.hmt .hmt-sh:focus-visible { outline: 2px solid var(--hmt-accent); outline-offset: 2px; }
.hmt .hmt-sh-ico { flex: none; width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: 20%; }
.hmt .hmt-sh-ico img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; transform: scale(1.08); }
.hmt .hmt-sh-ico svg { display: block; width: 50%; height: 50%; }
.hmt .hmt-sh-lbl { display: none; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--hmt-ink); }
.hmt .hmt-sh--wa .hmt-sh-ico { background: #29a71a; }
.hmt .hmt-sh--tg .hmt-sh-ico { background: #1c8adb; }
.hmt .hmt-sh--ig .hmt-sh-ico { background: #e1306c; }
.hmt .hmt-sh--fb .hmt-sh-ico { background: #1976d2; }
.hmt .hmt-sh--x .hmt-sh-ico { background: #fff; }
.hmt .hmt-sh--copy .hmt-sh-ico { background: var(--hmt-accent); color: var(--hmt-ink); }
.hmt .hmt-sh-msg { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--hmt-accent-text); }
.hmt .hmt-sh-msg:empty { display: none; }

.hmt-notice { padding: 12px 14px; border: 1px dashed #d63638; border-radius: 8px; color: #d63638; font: 14px/1.4 sans-serif; }

@media (min-width: 560px) {
	.hmt { padding: 24px; }
	.hmt .hmt-title { font-size: 28px; }
	.hmt .hmt-card { padding: 22px; }
	.hmt .hmt-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
	.hmt .hmt-sh { max-width: none; padding: 8px 12px 8px 8px; border: 1px solid var(--hmt-line); border-radius: 12px; background: #fff; }
	.hmt .hmt-sh:hover { background: var(--hmt-soft); border-color: #dcd8d2; }
	.hmt .hmt-sh-ico { width: 32px; }
	.hmt .hmt-sh-lbl { display: block; }
}

/* ---------- Pengaman dari gaya theme ----------
   Banyak theme memberi gaya kuat ke semua <button> dan <input> (warna, border, outline saat fokus).
   Untuk elemen interaktif tool, properti visualnya dikunci di sini. */
.hmt .hmt-chip,
.hmt .hmt-sh,
.hmt .hmt-step-btn {
	text-transform: none !important; letter-spacing: normal !important; text-decoration: none !important;
	min-height: 0 !important; min-width: 0 !important; line-height: 1.4 !important; box-shadow: none !important;
}
.hmt .hmt-chip { background: #fff !important; color: var(--hmt-ink) !important; border: 1px solid var(--hmt-line) !important; border-radius: 999px !important; padding: 6px 12px !important; font-size: 13px !important; font-weight: 400 !important; }
.hmt .hmt-chip:hover, .hmt .hmt-chip:focus-visible { background: var(--hmt-soft) !important; border-color: #dcd8d2 !important; }
.hmt .hmt-sh { color: var(--hmt-ink) !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; font-size: 14px !important; }
.hmt .hmt-step-btn { background: #fff !important; color: var(--hmt-ink) !important; border: 0 !important; border-radius: 10px !important; padding: 0 !important; font-size: 22px !important; font-weight: 700 !important; line-height: 1 !important; box-shadow: 0 1px 2px rgba(0,0,0,.08) !important; }
.hmt .hmt-step-btn:hover { background: var(--hmt-soft) !important; }

.hmt .hmt-money input,
.hmt .hmt-text,
.hmt .hmt-plain-input {
	outline: none !important; box-shadow: none !important; min-height: 0 !important; max-width: none !important;
	color: var(--hmt-ink) !important; font-family: inherit !important; letter-spacing: normal !important;
}
.hmt .hmt-money input, .hmt .hmt-plain-input { border: 0 !important; background: transparent !important; border-radius: 0 !important; }
.hmt .hmt-money input { padding: 13px 14px 13px 4px !important; font-size: 18px !important; font-weight: 600 !important; }
.hmt .hmt-text { border: 1.5px solid var(--hmt-line) !important; border-radius: 12px !important; background: var(--hmt-soft) !important; padding: 12px 14px !important; font-size: 16px !important; }
.hmt .hmt-text:focus { border-color: var(--hmt-accent) !important; background: #fff !important; }
.hmt input[type=range] { outline: none !important; box-shadow: none !important; border: 0 !important; background: transparent !important; padding: 0 !important; }
.hmt :focus { outline-offset: 2px; }

@media (min-width: 560px) {
	.hmt .hmt-sh { padding: 8px 12px 8px 8px !important; border: 1px solid var(--hmt-line) !important; border-radius: 12px !important; background: #fff !important; }
	.hmt .hmt-sh:hover { background: var(--hmt-soft) !important; border-color: #dcd8d2 !important; }
}

/* Layar sempit (<560px): theme sudah memberi jarak tepi, jadi padding tool dikurangi */
@media (max-width: 559px) {
	.hmt-frame { margin: 16px 0; }
	.hmt { padding: 4px 0 8px; }
	.hmt .hmt-card { padding: 16px 14px; border-radius: 14px; }
	.hmt .hmt-title { font-size: 22px; }
	.hmt .hmt-share { gap: 5px; }
}
/* Ikon salin link: theme sering memberi fill ke semua svg, jadi dikunci sebagai garis */
.hmt .hmt-sh--copy .hmt-sh-ico svg,
.hmt .hmt-sh--copy .hmt-sh-ico svg path { fill: none !important; stroke: currentColor !important; stroke-width: 2.2 !important; }
.hmt .hmt-sh--copy .hmt-sh-ico svg { width: 46% !important; height: 46% !important; max-width: none !important; margin: 0 !important; }

/* ---------- Halaman landing, versi ringkas, & tools lainnya ---------- */
.hmt-hub .hmt-hub-grid { display: grid; gap: 12px; }
.hmt .hmt-hub-card {
	display: flex; align-items: flex-start; gap: 14px; padding: 16px; margin: 0;
	background: var(--hmt-card); border: 1px solid var(--hmt-line); border-radius: 16px;
	color: var(--hmt-ink) !important; text-decoration: none !important; box-shadow: none;
	transition: transform .15s, border-color .15s, box-shadow .15s;
}
.hmt a.hmt-hub-card:hover { border-color: #dcd8d2; box-shadow: 0 6px 18px rgba(48,55,63,.08); transform: translateY(-2px); }
.hmt a.hmt-hub-card:focus-visible { outline: 2px solid var(--hmt-accent); outline-offset: 2px; }
.hmt .hmt-hub-ico { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--hmt-ico-bg, var(--hmt-accent-soft)); font-size: 30px; line-height: 1; }
.hmt .hmt-hub-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hmt .hmt-hub-body b { font-family: var(--hmt-head-font); font-size: 17px; font-weight: 700; line-height: 1.3; }
.hmt .hmt-hub-teaser { font-size: 14px; color: var(--hmt-muted); line-height: 1.45; }
.hmt .hmt-hub-cta { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--hmt-accent-text); }
.hmt .hmt-hub-card.is-missing { flex-wrap: wrap; opacity: .7; border-style: dashed; }
.hmt .hmt-hub-warn { flex: 1 0 100%; font-size: 12px; color: #b42a24; }

.hmt .hmt-hub-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hmt .hmt-hub-top h3 { margin: 0; }
.hmt .hmt-hub-all { flex: none; font-size: 13px; font-weight: 700; color: var(--hmt-accent-text) !important; text-decoration: none !important; }
.hmt .hmt-hub-all:hover { text-decoration: underline !important; }

/* Baris kartu kecil yang bisa digeser (homepage & tools lainnya) */
.hmt .hmt-hub-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.hmt .hmt-hub-row::-webkit-scrollbar { display: none; }
.hmt .hmt-hub-row .hmt-hub-card { flex: 0 0 220px; scroll-snap-align: start; align-items: center; padding: 12px; gap: 12px; border-radius: 14px; }
.hmt .hmt-hub-row .hmt-hub-ico { width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
.hmt .hmt-hub-row .hmt-hub-body b { font-size: 15px; }
.hmt .hmt-hub-row .hmt-hub-cta { margin-top: 0; font-size: 12px; }
.hmt-hub--compact { padding-top: 8px; padding-bottom: 8px; }
.hmt .hmt-related .hmt-hub-row { margin: 0 -14px; padding: 2px 14px 4px; }

@media (min-width: 560px) {
	.hmt-hub .hmt-hub-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
	.hmt .hmt-hub-grid .hmt-hub-card { flex-direction: column; gap: 12px; padding: 20px; }
	.hmt .hmt-hub-row { margin: 0; padding: 2px 0 4px; }
	.hmt .hmt-related .hmt-hub-row { margin: 0; padding: 2px 0 4px; }
}
/* Landing di halaman lebar tanpa tower: 3 kolom */
@container (min-width: 900px) {
	.hmt-frame:not(.hmt-frame--rails) .hmt-hub { max-width: 960px; }
	.hmt-frame:not(.hmt-frame--rails) .hmt-hub .hmt-hub-grid { grid-template-columns: repeat(3, 1fr); }
}
