/* ============================================================================
   Your Ballot · Action Layer — styles for the #pdx-actions panel + composer.

   The deeper "do something about it" layer beneath Your Ballot: contact your
   reps with a pre-drafted, editable message about a specific stance or promise,
   and see the voting deadlines that apply to your saved location with one-tap
   "add to calendar" reminders.

   Reuses the app's tokens (navy field, amber "you/team" accent, Barlow type) so
   it reads as native, sitting quietly between Your Ballot and the impact widget.
   Mobile-first: cards wrap, touch targets stay >= 44px, the composer becomes a
   full-height sheet on small screens. Calm, non-partisan, non-intrusive.
   ========================================================================== */

#pdx-actions {
  padding: 0.5rem 1rem 1.5rem;
}
#pdx-actions * { box-sizing: border-box; }

.pdx-act-card {
  max-width: 62rem;
  margin: 0 auto;
  background:
    radial-gradient(900px 300px at 0% -20%, rgba(245, 200, 66, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(14, 22, 46, 0.9), rgba(10, 16, 34, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: #e5e9f0;
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
}

/* ── header ──────────────────────────────────────────────────────────────── */
.pdx-act-head { display: flex; align-items: flex-start; gap: 0.85rem; flex-wrap: wrap; }
.pdx-act-ico {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: radial-gradient(circle at 30% 25%, rgba(74, 222, 128, 0.24), rgba(74, 222, 128, 0.06));
  border: 1px solid rgba(74, 222, 128, 0.32);
}
.pdx-act-titles { min-width: 0; flex: 1 1 16rem; }
.pdx-act-eyebrow {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #7fe6a0; font-weight: 800;
}
.pdx-act-h { font-size: 1.32rem; line-height: 1.15; font-weight: 800; color: #f4f8ff; margin: 0.15rem 0 0; }
.pdx-act-h b { color: #f5c842; }
.pdx-act-sub { font-size: 0.88rem; color: #9db0cf; margin: 0.3rem 0 0; max-width: 54ch; line-height: 1.4; }
.pdx-act-impact {
  margin-left: auto; text-align: right; align-self: center;
  font-size: 0.78rem; color: #b8c4dc; line-height: 1.3;
}
.pdx-act-impact b { display: block; font-size: 1.5rem; font-weight: 800; color: #7fe6a0; }

/* ── group headings ──────────────────────────────────────────────────────── */
.pdx-act-group { margin-top: 1.15rem; }
.pdx-act-group-h {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: #8ea3c4; font-weight: 800; margin-bottom: 0.6rem;
}
.pdx-act-group-h .pdx-act-hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; color: #6f82a4; font-size: 0.72rem; }

/* ── rep contact rows ────────────────────────────────────────────────────── */
.pdx-act-reps { display: grid; gap: 0.6rem; }
.pdx-act-rep {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.75rem; border-radius: 13px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07);
}
.pdx-act-rep-photo {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px;
  background-size: cover; background-position: center top;
  background-color: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.pdx-act-rep-body { min-width: 0; flex: 1; }
.pdx-act-rep-name { font-size: 0.95rem; font-weight: 700; color: #eaf1fe; line-height: 1.2; }
.pdx-act-rep-office { font-size: 0.75rem; color: #93a6c6; margin-top: 1px; }
.pdx-act-rep-ref {
  font-size: 0.72rem; color: #c7d4ea; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pdx-act-rep-ref .pdx-act-refdot { color: #f5c842; }
.pdx-act-rep-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 0.4rem; }
.pdx-act-contacted {
  font-size: 0.68rem; font-weight: 800; color: #7fe6a0;
  background: rgba(74, 222, 128, 0.13); border-radius: 9999px; padding: 3px 8px; white-space: nowrap;
}

/* ── deadline reminder cards ─────────────────────────────────────────────── */
.pdx-act-deadlines { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .pdx-act-deadlines { grid-template-columns: 1fr 1fr; } }
.pdx-act-dl {
  position: relative; display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.7rem 0.8rem; border-radius: 13px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--dlc, #ef4444);
}
.pdx-act-dl-ico { flex: 0 0 auto; font-size: 18px; line-height: 1.4; }
.pdx-act-dl-body { min-width: 0; flex: 1; }
.pdx-act-dl-tag {
  font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 800; color: var(--dlc, #ef4444);
}
.pdx-act-dl-title { font-size: 0.9rem; font-weight: 700; color: #eaf1fe; margin: 1px 0 2px; line-height: 1.2; }
.pdx-act-dl-when { font-size: 0.74rem; color: #9db0cf; }
.pdx-act-dl-count { font-weight: 800; color: #f4f8ff; }
.pdx-act-dl-count.soon { color: #ffb4a8; }
.pdx-act-dl-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.pdx-act-dl-x {
  position: absolute; top: 5px; right: 6px;
  background: none; border: none; color: #6f82a4; font-size: 0.85rem; line-height: 1;
  cursor: pointer; padding: 4px; border-radius: 6px;
}
.pdx-act-dl-x:hover { color: #cfe0f5; background: rgba(255, 255, 255, 0.08); }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.pdx-act-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  font-family: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em;
  color: #cfe0f5; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 9px;
  padding: 0.5rem 0.7rem; cursor: pointer; transition: all 0.16s; text-decoration: none;
  min-height: 38px;
}
.pdx-act-btn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.pdx-act-btn--sm { padding: 0.42rem 0.6rem; min-height: 34px; font-size: 0.74rem; }
.pdx-act-btn--gold { color: #0a0f1e; background: linear-gradient(135deg, #fad96a, #e6b800); border-color: rgba(245, 200, 66, 0.9); }
.pdx-act-btn--gold:hover { filter: brightness(1.05); }
.pdx-act-btn--green { color: #05210f; background: linear-gradient(135deg, #86efac, #34d399); border-color: rgba(52, 211, 153, 0.9); }
.pdx-act-btn--green:hover { filter: brightness(1.04); }

/* ── empty / prompt state ────────────────────────────────────────────────── */
.pdx-act-empty { text-align: center; padding: 1.2rem 0.75rem; color: #9db0cf; }
.pdx-act-empty-ico { font-size: 1.9rem; opacity: 0.9; }
.pdx-act-empty-t { font-size: 1rem; font-weight: 700; color: #eaf1fe; margin: 0.4rem 0 0.2rem; }
.pdx-act-empty-d { font-size: 0.85rem; max-width: 44ch; margin: 0 auto; line-height: 1.45; }

.pdx-act-note {
  margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem; color: #7f93b3; line-height: 1.5;
}

/* ── contact composer drawer ─────────────────────────────────────────────── */
.pdx-act-overlay {
  position: fixed; inset: 0; z-index: 140;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 8, 18, 0.72); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.2s ease;
}
@media (min-width: 720px) { .pdx-act-overlay { align-items: center; padding: 1rem; } }
.pdx-act-overlay.is-open { opacity: 1; }
.pdx-act-overlay[hidden] { display: none; }

.pdx-act-sheet {
  width: 100%; max-width: 540px; max-height: 92vh; overflow: auto;
  background: linear-gradient(160deg, #141d36, #0d1425);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px 18px 0 0;
  padding: 1.1rem 1.15rem 1.3rem;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55);
  color: #e5e9f0; font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  transform: translateY(16px); transition: transform 0.22s ease;
}
@media (min-width: 720px) { .pdx-act-sheet { border-radius: 18px; } }
.pdx-act-overlay.is-open .pdx-act-sheet { transform: translateY(0); }

.pdx-act-sheet-head { display: flex; align-items: flex-start; gap: 0.6rem; }
.pdx-act-sheet-photo {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 11px;
  background-size: cover; background-position: center top; background-color: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.pdx-act-sheet-titles { min-width: 0; flex: 1; }
.pdx-act-sheet-eyebrow { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: #7fe6a0; font-weight: 800; }
.pdx-act-sheet-name { font-size: 1.15rem; font-weight: 800; color: #f4f8ff; line-height: 1.15; margin-top: 1px; }
.pdx-act-sheet-office { font-size: 0.78rem; color: #93a6c6; margin-top: 1px; }
.pdx-act-x {
  flex: 0 0 auto; background: none; border: none; color: #8ea3c4; font-size: 1.15rem;
  cursor: pointer; line-height: 1; padding: 4px 6px; border-radius: 8px;
}
.pdx-act-x:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.pdx-act-sect { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8ea3c4; font-weight: 800; margin: 1rem 0 0.45rem; }
.pdx-act-refs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pdx-act-ref-chip {
  font-family: inherit; font-size: 0.75rem; font-weight: 700; color: #c7d4ea;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px; padding: 0.35rem 0.7rem; cursor: pointer; transition: all 0.14s;
}
.pdx-act-ref-chip:hover { background: rgba(255, 255, 255, 0.1); }
.pdx-act-ref-chip.is-on {
  color: #0a0f1e; background: linear-gradient(135deg, #fad96a, #e6b800); border-color: rgba(245, 200, 66, 0.9);
}

.pdx-act-field { margin-top: 0.5rem; }
.pdx-act-input, .pdx-act-textarea {
  width: 100%; font-family: inherit; color: #eef3fb;
  background: rgba(6, 11, 24, 0.6); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px; padding: 0.6rem 0.7rem; font-size: 0.86rem; line-height: 1.5;
}
.pdx-act-input:focus, .pdx-act-textarea:focus { outline: none; border-color: rgba(245, 200, 66, 0.6); }
.pdx-act-textarea { min-height: 190px; resize: vertical; }
.pdx-act-input { margin-bottom: 0.5rem; }

.pdx-act-sheet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.pdx-act-sheet-actions .pdx-act-btn { flex: 1 1 auto; }
.pdx-act-sheet-note { margin-top: 0.8rem; font-size: 0.7rem; color: #7f93b3; line-height: 1.5; }
.pdx-act-sheet-note b { color: #b8c4dc; }
