/* ==========================================================================
   WIDGET JADWAL SIDANG — PN Banyuwangi
   ========================================================================== */

.pnbyw-js-widget {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 10px;
  overflow: hidden;
  font-size: 12px;
  margin-bottom: 12px;
}

/* ── Header ── */
.pnbyw-js-header {
  background: linear-gradient(135deg, #9a2109, #c0300f);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.pnbyw-js-header svg { flex-shrink: 0; opacity: .9; }

.pnbyw-js-title {
  flex: 1;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.pnbyw-js-date {
  font-size: 10px;
  opacity: .8;
  flex-shrink: 0;
}

/* ── Tabs ── */
.pnbyw-js-tabs {
  display: flex;
  border-bottom: 2px solid #e2e4e8;
  background: #f9f9f9;
}

.pnbyw-js-tab {
  flex: 1;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color .15s, border-color .15s;
}

.pnbyw-js-tab:hover { color: #9a2109; }

.pnbyw-js-tab.active {
  color: #9a2109;
  border-bottom-color: #9a2109;
  background: #fff;
}

/* ── Badge count ── */
.pnbyw-js-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: #e2e4e8;
  color: #374151;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  transition: background .15s, color .15s;
}

.pnbyw-js-tab.active .pnbyw-js-count {
  background: #9a2109;
  color: #fff;
}

/* ── Panel / Table wrap ── */
.pnbyw-js-panel { }

.pnbyw-js-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e4e8 transparent;
}

.pnbyw-js-table-wrap::-webkit-scrollbar { width: 4px; }
.pnbyw-js-table-wrap::-webkit-scrollbar-thumb {
  background: #e2e4e8;
  border-radius: 2px;
}

/* ── Table ── */
.pnbyw-js-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.pnbyw-js-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f5f7;
}

.pnbyw-js-table th {
  padding: 7px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 10px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #e2e4e8;
  white-space: nowrap;
}

.pnbyw-js-table td {
  padding: 7px 10px;
  color: #1a1d23;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  line-height: 1.4;
}

.pnbyw-js-table tr:last-child td { border-bottom: none; }

.pnbyw-js-table tbody tr:hover td { background: #fef8f6; }

.pnbyw-js-table td:first-child {
  font-weight: 600;
  color: #9a2109;
  white-space: nowrap;
}

.pnbyw-js-table td:nth-child(2) {
  white-space: nowrap;
  color: #374151;
}

/* ── States ── */
.pnbyw-js-loading,
.pnbyw-js-empty,
.pnbyw-js-error {
  text-align: center;
  padding: 16px;
  color: #9ca3af;
}

.pnbyw-js-error { color: #dc2626; }

/* ── Spinner ── */
.pnbyw-js-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #e2e4e8;
  border-top-color: #9a2109;
  border-radius: 50%;
  animation: pnbywSpin .7s linear infinite;
  vertical-align: middle;
  margin-right: 5px;
}

@keyframes pnbywSpin {
  to { transform: rotate(360deg); }
}

/* ── Footer ── */
.pnbyw-js-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.pnbyw-js-refresh-info {
  font-size: 10px;
  color: #9ca3af;
}

.pnbyw-js-refresh-btn {
  font-size: 10px;
  font-weight: 600;
  color: #9a2109;
  background: none;
  border: 1px solid rgba(154,33,9,.3);
  border-radius: 4px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.pnbyw-js-refresh-btn:hover {
  background: #9a2109;
  color: #fff;
}

.pnbyw-js-refresh-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Notice (DB belum dikonfigurasi) ── */
.pnbyw-js-notice {
  padding: 16px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
}

.pnbyw-js-notice code {
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
}

/* ── Jarak antar widget di sidebar ── */
.pnbyw-jadwal-sidang-wrap {
  margin-bottom: 10px;
}