/* ==========================================================================
   Widget beranda: JAM LAYANAN (status) & SURVEI interaktif
   Mobile-first (Android & iOS): target sentuh >= 44px, tanpa efek hanya-hover,
   tanpa ketergantungan fitur CSS baru (tidak memakai color-mix / container query).
   Warna mengikuti --primary & --accent template. Sudut mengikuti --shape(-s) dari user.css
   bila ada (gaya tumpul), jika tidak ada tetap rapi (radius kecil).
   ========================================================================== */

.pa-hours, .pa-survey { -webkit-text-size-adjust: 100%; }
.pa-hours button, .pa-survey button, .pa-hours [tabindex], .pa-survey a {
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pa-hours :focus-visible, .pa-survey :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ------------------------------ JAM LAYANAN ------------------------------ */
.pa-hours { display: grid; gap: 12px; }

.pa-status {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 16px 14px 15px; color: #fff; border-radius: 6px; clip-path: var(--shape-s, none);
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(0,0,0,.2)), var(--primary);
  transition: background .4s ease;
}
.is-istirahat .pa-status { background: linear-gradient(160deg, rgba(255,255,255,.3), rgba(0,0,0,.06)), var(--accent); color: #2a1a00; }
.is-tutup .pa-status { background: linear-gradient(160deg, #dc3d33, #8f1d17); color: #fff; }
.is-loading .pa-status { background: #6b7a72; }

.pa-status-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .14em; opacity: .9; }
.pa-status-clock { margin-left: 4px; padding: 1px 8px; border-radius: 4px; background: rgba(0,0,0,.22); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.pa-status-title { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.7rem, 7vw, 2.1rem); line-height: 1.1; letter-spacing: .04em; }
.pa-dot { width: 13px; height: 13px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
.is-buka .pa-dot { animation: pa-pulse 1.8s ease-out infinite; }
.is-istirahat .pa-dot { background: #2a1a00; }
.pa-status-reason { padding: 2px 10px; border-radius: 4px; background: rgba(0,0,0,.2); font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.pa-status-note { font-size: .86rem; line-height: 1.45; max-width: 34ch; }

/* tab Reguler / Ramadhan */
.pa-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 8px; background: #eaf0ea; border: 1px solid #d9e4d9; }
.pa-seg-btn {
  -webkit-appearance: none; appearance: none; min-height: 44px; border: 0; border-radius: 6px; background: transparent;
  font: inherit; font-size: .84rem; font-weight: 700; color: #3b5246; cursor: pointer; transition: background .2s, color .2s;
}
.pa-seg-btn[aria-selected="true"] { background: linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.28)), var(--primary); color: #fff; }

/* daftar jam */
.pa-hlist { list-style: none; margin: 0; padding: 0; }
.pa-hlist[hidden] { display: none; }
.pa-hrow {
  display: grid; grid-template-columns: minmax(70px, 92px) 1fr; gap: 12px; align-items: start;
  padding: 12px 8px; border-top: 1px solid #e3ebe3; cursor: pointer; transition: background .2s;
  border-radius: 4px;
}
.pa-hrow:first-child { border-top: 0; }
.pa-hrow[data-today="true"] { background: #f1f7f1; box-shadow: inset 3px 0 0 var(--accent); }
.pa-hrow-day { font-size: .8rem; font-weight: 800; line-height: 1.25; color: #26382f; }
.pa-hrow-body { display: grid; gap: 6px; justify-items: start; padding-left: 12px; border-left: 2px solid #26382f; }
.pa-hrow-time { font-size: 1.08rem; line-height: 1.2; letter-spacing: .01em; color: #14231b; font-variant-numeric: tabular-nums; }
.pa-hrow.is-closed .pa-hrow-time { color: #b3261e; }
.pa-hrow-note {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 1px solid transparent;
  font-size: .74rem; color: #6a7b72; transition: background .2s, color .2s, border-color .2s;
}
.pa-hrow-note .icon { width: 15px; height: 15px; flex: none; }
.pa-hrow:hover .pa-hrow-note,
.pa-hrow:focus-visible .pa-hrow-note,
.pa-hrow[data-open="true"] .pa-hrow-note { background: #e7f1e9; border-color: #cfe1d3; color: var(--primary); font-weight: 700; }
.pa-hrow.is-closed:hover .pa-hrow-note,
.pa-hrow.is-closed[data-open="true"] .pa-hrow-note { background: #fbe9e7; border-color: #f2c9c4; color: #b3261e; }

.pa-next {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; font-size: .8rem; line-height: 1.4;
  background: #fff8ea; border-left: 3px solid var(--accent); border-radius: 4px; color: #4a3a12;
}
.pa-next[hidden] { display: none; }
.pa-next .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pa-next b { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }

.pa-hours-foot {
  margin: 0; padding: 10px 12px; text-align: center; font-size: .74rem; line-height: 1.5; color: #6a7b72;
  border: 1px dashed #d3dfd5; border-radius: 6px; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.pa-hours-foot:hover, .pa-hours-foot.is-active { background: #eaf3ec; border-color: #c9ddcd; color: #2c4a3a; }

/* ------------------------------ SURVEI ------------------------------ */
.info-card.pa-survey-card { padding: 0; border: 0; border-top: 0; background: transparent; }

.pa-survey {
  position: relative; display: grid; gap: 12px; padding: 16px; color: #fff; border-radius: 8px; clip-path: var(--shape, none);
  background:
    radial-gradient(120% 80% at 100% 0, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(165deg, rgba(0,0,0,.18), rgba(0,0,0,.66)), var(--primary);
}
.pa-demo { justify-self: start; padding: 3px 9px; border-radius: 4px; background: #fff3cd; color: #6b4a00; font-size: .62rem; font-weight: 800; letter-spacing: .1em; }

.pa-survey-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pa-pill { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; clip-path: var(--shape-s, none); }
.pa-pill-mutu { background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.3); color: #b8f5d6; }
.pa-survey[data-grade="B"] .pa-pill-mutu { color: #fff0a8; }
.pa-survey[data-grade="C"] .pa-pill-mutu { color: #ffcf94; }
.pa-survey[data-grade="D"] .pa-pill-mutu { color: #ffb4ab; }
.pa-pill-tw { background: #fff; color: #0f3d2c; }

.pa-survey-title { margin: 0; font-size: clamp(1.2rem, 5vw, 1.55rem); line-height: 1.2; color: #fff; }
.pa-survey-sub { margin: -6px 0 0; font-size: .78rem; line-height: 1.45; color: #bfe8d4; }

.pa-icards { display: grid; gap: 10px; }
.pa-icard {
  -webkit-appearance: none; appearance: none; display: grid; gap: 7px; width: 100%; min-height: 44px; margin: 0; padding: 12px 14px; text-align: left;
  font: inherit; color: inherit; cursor: pointer; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08);
  clip-path: var(--shape-s, none); transition: background .2s, border-color .2s, transform .2s;
}
.pa-icard:hover { background: rgba(255,255,255,.14); }
.pa-icard:active { transform: scale(.985); }
.pa-icard[aria-expanded="true"] { border-color: var(--accent); background: rgba(255,255,255,.16); }
.pa-icard-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pa-icard-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pa-icard-name b { font-size: 1.25rem; font-weight: 800; letter-spacing: .02em; }
.pa-icard-name small { padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.28); color: #b8f5d6; font-size: .6rem; font-weight: 800; letter-spacing: .06em; }
.pa-icard-score { white-space: nowrap; }
.pa-icard-score b { font-size: 1.75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pa-icard-score small { margin-left: 3px; font-size: .72rem; color: #bfe8d4; }
.pa-icard-label { font-size: .74rem; color: #d6efe2; }
.pa-bar { display: block; height: 6px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.pa-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #3ddc97, var(--accent)); transition: width .7s cubic-bezier(.2,.8,.2,1); }

.pa-detail { padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.24); background: rgba(0,0,0,.3); font-size: .84rem; line-height: 1.55; animation: pa-rise .25s ease; }
.pa-detail[hidden] { display: none; }
.pa-detail p { margin: 6px 0 8px; color: #e6f5ec; }
.pa-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pa-detail-head button { -webkit-appearance: none; appearance: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.pa-detail-head .icon { width: 20px; height: 20px; }
.pa-detail-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #ffe3a3; font-weight: 700; text-decoration: none; }
.pa-detail-link .icon { width: 15px; height: 15px; }

.pa-survey-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.pa-resp { display: flex; align-items: center; gap: 10px; }
.pa-resp b { font-size: 1.75rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pa-resp span { display: grid; gap: 3px; }
.pa-resp em { justify-self: start; padding: 2px 7px; border-radius: 4px; background: rgba(61,220,151,.22); border: 1px solid rgba(61,220,151,.5); color: #b8f5d6; font-style: normal; font-size: .6rem; font-weight: 800; letter-spacing: .1em; }
.pa-resp small { font-size: .68rem; color: #bfe8d4; }
.pa-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border-radius: 6px;
  background: #fff; color: #0f3d2c; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; clip-path: var(--shape-s, none);
  transition: background .2s, color .2s, transform .2s;
}
.pa-cta .icon { width: 14px; height: 14px; }
.pa-cta:hover, .pa-cta:active { background: var(--accent); color: #2a1a00; }
.pa-cta:active { transform: scale(.97); }

.pa-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pa-chip {
  -webkit-appearance: none; appearance: none; min-height: 44px; min-width: 64px; padding: 0 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: #d6efe2;
  font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .06em; clip-path: var(--shape-s, none); transition: background .2s, color .2s;
}
.pa-chip:hover { background: rgba(255,255,255,.2); }
.pa-chip[aria-pressed="true"] { background: #3ddc97; border-color: #3ddc97; color: #06281d; }

/* layar lebih lebar: kartu indeks berjejer bila ruang cukup */
@media (min-width: 1100px) { .pa-icards { grid-template-columns: 1fr; } }

@keyframes pa-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.75); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@keyframes pa-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .is-buka .pa-dot, .pa-detail { animation: none; }
  .pa-bar i, .pa-status, .pa-icard { transition: none; }
}
@media print { .pa-seg, .pa-chips, .pa-cta { display: none; } }
