/* Page builder: daftar situs, pemilih foto & ikon, editor layar penuh. */

/* ============ Situs & halaman ============ */
.situs-kepala { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.situs-kepala h2 { margin-bottom: 2px; }
.situs-kepala a.redup { text-decoration: none; }
.situs-aksi { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.isian-gabung { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.isian-gabung input { border: 0; border-radius: 0; }
.isian-gabung span { padding: 0 12px; color: var(--muted); background: var(--bg); align-self: stretch; display: flex; align-items: center; font-size: 14px; }
.pilih-templat { display: flex; flex-direction: column; gap: 8px; }
.pilih-templat label { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; margin: 0; }
.pilih-templat input { grid-row: span 2; margin-top: 4px; }
.pilih-templat span { color: var(--muted); font-size: 13px; }
.pilih-templat label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }

/* ============ Ikon ============ */
.ikon { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; vertical-align: middle; }
.btn-ikon { justify-content: flex-start; width: 100%; font-weight: 500; }
.pemilih-ikon { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-bottom: 14px; }
.pemilih-ikon button { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pemilih-ikon button:hover { border-color: var(--blue); color: var(--blue); }
.pemilih-ikon .ikon { width: 24px; height: 24px; }
.pemilih-ikon small { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.ikon-grup { font-size: 13px; color: var(--muted); margin: 4px 0 8px; font-family: var(--font); }
dialog.dlg-lebar { width: min(760px, calc(100vw - 32px)); }
.pemilih-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 55vh; overflow: auto; padding: 2px; }
.pemilih-foto { border: 2px solid transparent; border-radius: 10px; padding: 0; cursor: pointer; background: #eef2f7; aspect-ratio: 1; overflow: hidden; }
.pemilih-foto:hover { border-color: var(--blue); }
.pemilih-foto img { width: 100%; height: 100%; object-fit: contain; }
.bar-cari label.btn { margin: 0; font-size: 14px; }

/* ============ Editor (layar penuh) ============ */
body.mode-editor .panel { grid-template-columns: 1fr; }
body.mode-editor .sisi, body.mode-editor .atas-hp { display: none; }
body.mode-editor .utama { padding: 0; }
.ed { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.ed-atas { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ed-judul { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.ed-judul b, .ed-judul span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-judul span { font-size: 12px; }
.ed-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ed-status.galat { color: var(--red); font-weight: 700; }
.ed-status.ok { color: var(--green); font-weight: 700; }
.ed-alat { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ed-perangkat { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ed-perangkat button { border: 0; background: #fff; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ed-perangkat button.aktif { background: var(--blue); color: #fff; }
.ed-badan { flex: 1; display: grid; grid-template-columns: 380px 1fr; min-height: 0; }
.ed-kiri { background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; padding: 14px; }
.ed-kanan { overflow: auto; display: flex; justify-content: center; padding: 18px; }
.ed-bingkai { width: 100%; height: 100%; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 33, 58, .12); overflow: hidden; transition: width .2s; }
.ed-hp .ed-bingkai { width: 390px; max-width: 100%; border: 10px solid #1d2433; border-radius: 34px; }
.ed-bingkai iframe { width: 100%; height: 100%; border: 0; display: block; }
.ed-tab-hp { display: none; }
.ed-tab { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; margin-bottom: 14px; }
.ed-tab button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.ed-tab button.aktif { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.ed-konflik { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); background: #fff3d6; color: #8a5a00; border: 1px solid #f5d38a; padding: 10px 14px; border-radius: 10px; z-index: 40; display: flex; gap: 10px; align-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.ed-catatan { font-size: 13px; margin-bottom: 12px; }
.ed-sub { font-size: 14px; margin: 18px 0 10px; font-family: var(--font); }

.blok-daftar { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.blok-baris { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; }
.blok-baris:hover { border-color: var(--blue); }
.blok-baris.diseret { opacity: .4; }
.blok-baris.sasaran { box-shadow: 0 -3px 0 var(--blue); }
.blok-baris.blok-hp::after { content: "HP"; font-size: 10px; font-weight: 700; color: var(--muted); }
.blok-baris.blok-desktop::after { content: "PC"; font-size: 10px; font-weight: 700; color: var(--muted); }
.pegangan { cursor: grab; color: var(--muted); font-size: 16px; user-select: none; }
.blok-ikon { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.blok-nama { flex: 1; min-width: 0; text-align: left; border: 0; background: none; cursor: pointer; padding: 2px 0; }
.blok-nama b { display: block; font-size: 14px; }
.blok-nama small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blok-aksi, .daftar-aksi { display: flex; gap: 2px; flex: none; }
.blok-aksi button, .daftar-aksi button { border: 0; background: none; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 13px; }
.blok-aksi button:hover, .daftar-aksi button:hover { background: var(--bg); color: var(--text); }
.palet-blok { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 60vh; overflow: auto; }
.palet-blok button { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; }
.palet-blok button:hover { border-color: var(--blue); background: var(--blue-soft); }
.palet-blok .blok-ikon { grid-row: span 2; }
.palet-blok small { color: var(--muted); font-size: 12px; }
.ed-blok-kepala { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ed-blok-aksi { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }

.form .isian { margin-bottom: 12px; }
.isian-cek label { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; cursor: pointer; }
.isian textarea { resize: vertical; min-height: 60px; }
.isian-warna { display: flex; gap: 8px; }
.isian-warna input[type=color] { width: 44px; height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 3px; background: #fff; flex: none; cursor: pointer; }
.isian-media { display: flex; gap: 10px; align-items: center; }
.media-pratinjau { width: 72px; height: 72px; border-radius: 10px; background: #eef2f7 repeating-conic-gradient(#e3e9f1 0 25%, #eef2f7 0 50%) 50% / 16px 16px; display: grid; place-items: center; overflow: hidden; flex: none; }
.media-pratinjau img { width: 100%; height: 100%; object-fit: contain; }
.media-pratinjau span { font-size: 11px; color: var(--muted); }
.isian-media > div:last-child { display: flex; flex-direction: column; gap: 6px; }
.isian-daftar { background: var(--bg); border-radius: 10px; padding: 10px; }
.daftar-kepala { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.daftar-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; }
.daftar-item > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
.daftar-item > summary::-webkit-details-marker { display: none; }
.daftar-judul { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daftar-item > .form { padding: 12px 12px 2px; border-top: 1px solid var(--border); }
.ed-grup { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.ed-grup > summary { padding: 12px 14px; font-weight: 700; cursor: pointer; }
.ed-grup[open] > summary { border-bottom: 1px solid var(--border); }
.ed-grup > .form, .ed-grup > .palet { padding: 12px 14px 2px; }
.palet { display: flex; flex-wrap: wrap; gap: 6px; }
.palet button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 4px 10px 4px 4px; font-size: 12px; cursor: pointer; }
.palet button:hover { border-color: var(--blue); }
.palet .contoh { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1); }
.google-pr { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-family: arial, sans-serif; }
.google-pr span { font-size: 12px; color: #4d5156; display: block; }
.google-pr b { color: #1a0dab; font-size: 18px; font-weight: 400; display: block; line-height: 1.3; margin: 2px 0; }
.google-pr p { color: #4d5156; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 860px) {
  .ed { height: 100dvh; }
  .ed-atas { gap: 8px; padding: 8px 10px; }
  .ed-alat { width: 100%; justify-content: flex-end; }
  .ed-perangkat { display: none; }
  .ed-tab-hp { display: flex; background: var(--surface); border-bottom: 1px solid var(--border); }
  .ed-tab-hp button { flex: 1; border: 0; background: none; padding: 10px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; }
  .ed-tab-hp button.aktif { color: var(--blue); border-bottom-color: var(--blue); }
  .ed-badan { grid-template-columns: 1fr; }
  .ed-kanan { display: none; padding: 0; }
  .ed.lihat-kanan .ed-kiri { display: none; }
  .ed.lihat-kanan .ed-kanan { display: flex; }
  .ed-hp .ed-bingkai, .ed-bingkai { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .ed-kiri { border-right: 0; }
  .sembunyi-hp { display: none; }
}
