/* Webber Legislative — Sangguniang Panlungsod pages (builds on the Directory stylesheet: .wd tokens, cards, sidebar, sections) */

/* ── SP section navigation ─────────────────────────────────────────── */
.wl-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.wl-nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 1px solid var(--wd-line); border-radius: 999px; background: #fff; color: var(--wd-text); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.wl-nav a:hover { border-color: var(--wd-green); color: var(--wd-green); }
.wl-nav a[aria-current="page"] { background: var(--wd-green); border-color: var(--wd-green); color: #fff; }
.wl-nav .wl-count { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 22px; height: 22px; margin-left: 8px; padding: 0; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0; background: rgba(0, 0, 0, .08); }
.wl-nav .wl-count.is-wide { width: auto; min-width: 22px; padding: 0 6px; border-radius: 999px; }  /* 99+ */
.wl-nav a[aria-current="page"] .wl-count { background: rgba(255, 255, 255, .25); }

/* ── Term selector + toolbar ───────────────────────────────────────── */
.wl-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.wl-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wl-terms-label { font-size: 13px; font-weight: 600; color: var(--wd-muted); }
.wl-term { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--wd-line); background: #f3f4f6; color: #374151; font-size: 13px; font-weight: 600; text-decoration: none; }
.wl-term:hover { border-color: var(--wd-green); }
.wl-term[aria-current="true"] { background: var(--wd-green); border-color: var(--wd-green); color: #fff; }
.wl-term small { margin-left: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; opacity: .85; }
.wl-views { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wd-muted); }
.wl-views button { height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid #e5e7eb; background: #f3f4f6; color: #374151; font-size: 12px; cursor: pointer; }
.wl-views button.is-active { background: var(--wd-green); border-color: var(--wd-green); color: #fff; }

/* ── Officials: groups, grid and list ──────────────────────────────── */
.wl-group + .wl-group { margin-top: 34px; }
.wl-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--wd-green-dark); }
.wl-group-title::after { content: ""; flex: 1; height: 1px; background: var(--wd-line); }
.wl-people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.wl-presiding .wl-people, .wl-executive .wl-people { grid-template-columns: minmax(0, 280px); }
/* City Mayor and City Vice Mayor side by side */
.wl-leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.wl-leaders .wl-group + .wl-group { margin-top: 0; }
@media (max-width: 767px) { .wl-leaders { grid-template-columns: 1fr; } .wl-leaders .wl-group + .wl-group { margin-top: 34px; } }
.wl-person { display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 0 4px rgba(0, 0, 0, .25); text-decoration: none; color: var(--wd-text); transition: transform .2s, box-shadow .2s; }
.wl-person:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.wl-photo { aspect-ratio: 4 / 5; background: #e8f5ed; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--wd-green); }
.wl-photo-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.wl-person-body { padding: 14px 16px 16px; }
.wl-person-name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.wl-person-pos { margin: 3px 0 0; font-size: 13px; color: var(--wd-muted); line-height: 1.4; }
.wl-person-roles { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; color: #374151; }
.wl-person-roles li { margin-top: 3px; }
.wl-person-roles strong { color: var(--wd-green-dark); }
.wl-people .wl-person-roles { display: none; } /* roles show in the list view and on the profile */

/* list view */
.wl-people.is-list { grid-template-columns: 1fr; gap: 0; }
.wl-people.is-list .wl-person { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--wd-line); background: #fff; transform: none; }
.wl-people.is-list .wl-person:first-child { border-radius: 12px 12px 0 0; }
.wl-people.is-list .wl-person:last-child { border-radius: 0 0 12px 12px; border-bottom: 0; }
.wl-people.is-list .wl-person:hover { background: var(--wd-tint); }
.wl-people.is-list .wl-photo { flex: 0 0 52px; width: 52px; height: 52px; aspect-ratio: auto; border-radius: 50%; }
.wl-people.is-list .wl-person-body { flex: 1; min-width: 0; padding: 0; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) minmax(0, 1.4fr); gap: 4px 16px; align-items: center; }
.wl-people.is-list .wl-person-pos { margin: 0; }
.wl-people.is-list .wl-person-roles { display: block; margin: 0; }
.wl-presiding .wl-people.is-list, .wl-executive .wl-people.is-list { grid-template-columns: 1fr; }
@media (max-width: 1199px) { .wl-people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) { .wl-people { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wl-people.is-list .wl-person-body { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .wl-people { grid-template-columns: 1fr; } .wl-presiding .wl-people, .wl-executive .wl-people { grid-template-columns: 1fr; } }

/* ── Committees ────────────────────────────────────────────────────── */
.wl-committees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wl-committee { background: #fff; border: 1px solid var(--wd-line); border-radius: 12px; padding: 18px 20px; box-shadow: 0 0 4px rgba(0, 0, 0, .1); }
.wl-committee h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.wl-committee dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 14px; }
.wl-committee dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--wd-muted); padding-top: 2px; }
.wl-committee dd { margin: 0; line-height: 1.5; }
.wl-committee a { color: var(--wd-text); text-decoration: none; }
.wl-committee a:hover { color: var(--wd-green); text-decoration: underline; }
@media (max-width: 767px) { .wl-committees { grid-template-columns: 1fr; } }

/* ── Legislation: filters + table ──────────────────────────────────── */
.wl-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 18px; padding: 16px 18px; background: #fff; border-radius: 12px; box-shadow: 0 0 6px rgba(0, 0, 0, .12); }
.wl-filters label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #374151; }
.wl-filters input, .wl-filters select { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; background: #fff; }
.wl-filters input:focus, .wl-filters select:focus { outline: none; border-color: var(--wd-green); box-shadow: 0 0 0 3px rgba(13, 117, 53, .15); }
.wl-filters .wl-actions { display: flex; gap: 8px; }
.wl-btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--wd-green); color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.wl-btn:hover { background: var(--wd-green-dark); }
.wl-btn-ghost { background: #e5e7eb; color: #374151 !important; }
.wl-btn-ghost:hover { background: #d1d5db; }
@media (max-width: 991px) { .wl-filters { grid-template-columns: 1fr 1fr; } .wl-filters .wl-search { grid-column: 1 / -1; } }
@media (max-width: 520px) { .wl-filters { grid-template-columns: 1fr; } }

.wl-count-line { margin: 0 0 12px; font-size: 15px; color: #555; }
.wl-table-wrap { overflow-x: auto; }
.wl-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; font-size: 14px; }
.wl-table thead { background: #f8fafc; }
.wl-table th { padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #475569; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
.wl-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.wl-table tbody tr:hover { background: #f8fafc; }
.wl-table .wl-no { white-space: nowrap; font-weight: 700; color: var(--wd-green-dark); }
.wl-table .wl-title a { font-weight: 600; color: var(--wd-text); text-decoration: none; }
.wl-table .wl-title a:hover { color: var(--wd-green); text-decoration: underline; }
.wl-table .wl-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--wd-muted); }
.wl-table .wl-act { white-space: nowrap; text-align: right; }
.wl-table .wl-act > * { vertical-align: middle; margin-left: 4px; }
.wl-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #e5e7eb; color: #374151; }
.wl-status.is-enacted, .wl-status.is-approved { background: #dcfce7; color: #166534; }
.wl-status.is-pending { background: #fef3c7; color: #92400e; }
.wl-status.is-amended { background: #dbeafe; color: #1e40af; }
.wl-status.is-vetoed, .wl-status.is-repealed { background: #fee2e2; color: #991b1b; }
.wl-mini { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 600; text-decoration: none; border: 1px solid var(--wd-green); color: var(--wd-green) !important; background: #fff; }
.wl-mini:hover { background: var(--wd-tint); }
.wl-mini.is-solid { background: var(--wd-green); color: #fff !important; }
.wl-mini.is-solid:hover { background: var(--wd-green-dark); }
.wl-nofile { font-size: 12px; color: #9ca3af; }

.wl-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 24px 0 0; padding: 0; list-style: none; }
.wl-pagination a, .wl-pagination span { display: inline-block; min-width: 38px; padding: 6px 12px; text-align: center; border: 1px solid #dee2e6; border-radius: 6px; font-size: 14px; color: var(--wd-green); background: #fff; text-decoration: none; }
.wl-pagination a:hover { background: var(--wd-tint); }
.wl-pagination .current { background: var(--wd-green); border-color: var(--wd-green); color: #fff; }
.wl-pagination .dots { border-color: transparent; background: transparent; color: #9ca3af; }

/* small screens: the table becomes stacked cards */
@media (max-width: 767px) {
  .wl-table thead { display: none; }
  .wl-table, .wl-table tbody, .wl-table tr, .wl-table td { display: block; width: 100%; }
  .wl-table tr { padding: 12px 14px; border-bottom: 1px solid #e5e7eb; }
  .wl-table td { padding: 3px 0; border: 0; }
  .wl-table td[data-label]::before { content: attr(data-label) ": "; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--wd-muted); }
  .wl-table .wl-act { text-align: left; padding-top: 8px; }
  .wl-table .wl-act > * { margin: 0 6px 0 0; }
}

/* ── Single legislation: details list + viewer ─────────────────────── */
.wl-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.wl-meta li small { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--wd-muted); }
.wl-meta li { font-size: 14.5px; line-height: 1.45; }
.wl-meta a { color: var(--wd-green); }
.wl-viewer { margin: 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #f9fafb; }
.wl-viewer iframe { display: block; width: 100%; height: 680px; border: 0; background: #525659; }
.wl-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e5e7eb; font-size: 14px; font-weight: 700; }
.wl-viewer-bar span:last-child { display: inline-flex; gap: 10px; align-items: center; font-weight: 400; }
@media (max-width: 768px) { .wl-viewer iframe { height: 70vh; } }
.wl-recent { list-style: none; margin: 0; padding: 0; }
.wl-recent li + li { border-top: 1px solid #f1f5f9; }
.wl-recent a { display: block; padding: 9px 4px; color: var(--wd-text); font-size: 13.5px; line-height: 1.4; text-decoration: none; }
.wl-recent a:hover { color: var(--wd-green); }
.wl-recent small { display: block; color: var(--wd-muted); font-size: 11.5px; }

/* ── Official profile ──────────────────────────────────────────────── */
.wl-profile { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.wl-profile .wl-photo { border-radius: 12px; border: 1px solid var(--wd-line); }
.wl-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
@media (max-width: 640px) { .wl-profile { grid-template-columns: 1fr; } .wl-profile .wl-photo { max-width: 260px; } }

/* ── Filters: dropdown arrows get proper right-hand space (custom chevron instead of the browser's edge-hugging one) ── */
.wl-filters select {
  -webkit-appearance: none; appearance: none;
  padding-right: 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
  cursor: pointer;
}
.wl-filters--simple { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
@media (max-width: 991px) { .wl-filters--simple { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .wl-filters--simple { grid-template-columns: 1fr; } }

/* ── Tables: sensible column widths per tab ── */
.wl-table { table-layout: auto; }
.wl-table .wl-col-no { width: 112px; }
.wl-table .wl-col-date { width: 132px; }
.wl-table .wl-col-type { width: 120px; }
.wl-table .wl-col-status { width: 108px; }
.wl-table .wl-col-auth { width: 22%; }
.wl-table .wl-col-com { width: 28%; }
.wl-table .wl-date { white-space: nowrap; }
.wl-table .wl-act { width: 150px; }
.wl-type { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: #ede9fe; color: #5b21b6; white-space: nowrap; }
.wl-table--committees td { line-height: 1.55; }
.wl-table--committees a { color: var(--wd-text); text-decoration: none; }
.wl-table--committees a:hover { color: var(--wd-green); text-decoration: underline; }
.wl-table--committees td[data-label="Members"] { color: #374151; }

/* ── Line height reset ─────────────────────────────────────────────────────────
   The theme sets body { line-height: calc(12px + 1.05vw) } (a tall, width-based value) which every element inherits as a
   fixed pixel size — far too airy for tables and cards. Reset it inside the Sangguniang Panlungsod pages only. */
.wl { line-height: 1.5; }
.wl .wl-table th, .wl .wl-table td { line-height: 1.5; }
.wl .wl-table .wl-title a { line-height: 1.4; }
.wl .wl-table .wl-sub { line-height: 1.4; margin-top: 3px; }
.wl .wl-status, .wl .wl-type, .wl .wl-mini { line-height: 1.2; }
.wl .wl-person-name { line-height: 1.3; }
.wl .wl-person-pos, .wl .wl-person-roles { line-height: 1.4; }
.wl .wl-recent a { line-height: 1.4; }
