/* Interface do Avisos da Casa. css/style.css fica igual ao template do kit. */
:root {
  --accent: #0e7490;
  --primary: #0e7490;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #22b8d6;
    --primary: #22b8d6;
    --primary-contrast: #0b1a1f;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  margin-bottom: 14px;
}

.card h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-head h2 { margin: 0; }

.field textarea,
.field select {
  font: inherit;
  font-size: 16px; /* evita zoom no iOS */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.field textarea { resize: vertical; min-height: 84px; }

.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.send-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.send-actions .btn-wide { flex: 1; }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.chip input { accent-color: var(--accent); margin: 0; }

.chip:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.chip-off { opacity: 0.55; }

.options {
  margin-top: 12px;
  font-size: 14px;
}

.options summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
}

.options .field { margin-top: 10px; }

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
}

.options input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.quick-list,
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-item {
  display: flex;
  gap: 6px;
}

.quick-use,
.history-item {
  flex: 1;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  width: 100%;
}

.quick-del {
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-text { overflow-wrap: anywhere; }

.history-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.target-group + .target-group { margin-top: 12px; }

.target-group-title {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 6px;
}

/* Seções recolhíveis (cards e grupos de alvos). */
.card h2 { flex: 1; }

.collapse-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 2px 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.collapse-toggle .chevron {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 150ms ease;
}

.target-group-title .chevron { width: 14px; height: 14px; }

.collapse-toggle[aria-expanded="false"] .chevron { transform: rotate(-90deg); }

.collapse-count {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
}

.card:has(> .card-head .collapse-toggle[aria-expanded="false"]) > .card-head { margin-bottom: 0; }

.history-list .quick-item { align-items: stretch; }

@media (prefers-reduced-motion: reduce) {
  .collapse-toggle .chevron { transition: none; }
}

.collapse-toggle.target-group-title {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 6px;
}
