/* Only the phone chip library; television layouts are styled separately. */
.chip-templates { margin-top: 10px; padding: 15px; border: 1px solid #5d4b30; border-radius: 11px; background: #17130f; text-align: left; }
.chip-templates [hidden] { display: none !important; }
.chip-templates-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.chip-templates-heading-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-templates h3,.chip-templates h4 { margin: 0; color: #f4d89d; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.cast-play .chip-templates button { min-width: 0; min-height: 42px; padding: 7px 10px; border-radius: 8px; font-size: .78rem; line-height: 1.4; }
.chip-templates-hint,.chip-template-empty { margin: 9px 0 12px; color: #a99b82; font-size: .76rem; line-height: 1.6; }
.chip-template-list { display: grid; gap: 9px; }
.chip-template-card { min-width: 0; padding: 12px; border: 1px solid #5a4930; border-radius: 9px; background: #211a12; }
.chip-template-chips { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 9px 0 12px; color: #e9d8b8; font-size: .76rem; font-variant-numeric: tabular-nums; }
.chip-template-chips span { display: inline-flex; align-items: center; gap: 5px; }
.chip-template-chips i { display: inline-block; width: 18px; height: 18px; border: 2px dashed #ffffffa8; border-radius: 50%; box-shadow: 0 0 0 1px #ffffff30; }
.chip-template-actions { display: grid; grid-template-columns: minmax(0,1fr) 58px 58px; gap: 6px; }
.cast-play .chip-template-actions [data-chip-template-action="apply"],.cast-play .chip-template-editor-actions [type="submit"] { border-color: #ae8b50; color: #ffe6b4; background: #3a2b16; font-weight: 800; }
.cast-play .chip-templates [data-chip-template-action="delete"],.cast-play .chip-templates [data-chip-template-action="confirm-delete"] { color: #e9b9ae; border-color: #72514b; background: #32211e; }
.cast-play-chip-settings .chip-templates form { margin-top: 12px; padding: 12px; border-color: #94743f; background: #211a12; }
.chip-template-name-label { display: grid; gap: 6px; margin: 12px 0; color: #cdbb9d; font-size: .76rem; }
.chip-templates input { width: 100%; min-width: 0; height: 42px; padding: 6px 9px; border: 1px solid #765f3c; border-radius: 7px; background: #0b0a08; color: #fff3db; font-size: 1rem; }
.chip-template-rows { display: grid; gap: 8px; }
.chip-template-row { display: grid; grid-template-columns: minmax(0,1fr) 60px 52px; align-items: end; gap: 6px; }
.chip-template-row label { display: grid; min-width: 0; gap: 4px; color: #bba98d; font-size: .72rem; }
.chip-template-row input[type="color"] { padding: 4px; }
.chip-templates .chip-template-add { margin-top: 10px; width: 100%; }
.chip-template-editor-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.chip-template-delete-confirm { margin-top: 12px; padding: 12px; border: 1px solid #856347; border-radius: 9px; background: #251b13; }
.chip-template-delete-confirm p { margin: 0; color: #f3dfba; line-height: 1.6; overflow-wrap: anywhere; }
.chip-template-message { min-height: 1.5em; margin: 10px 0 0; color: #d7be8d; font-size: .76rem; line-height: 1.6; overflow-wrap: anywhere; }
.chip-template-message.is-error { color: #f2b2a3; }
@media (max-width: 420px) {
  .chip-templates { padding: 12px; }
  .chip-templates-heading { align-items: stretch; }
  .chip-templates-heading h3 { width: 100%; }
  .chip-templates-heading-actions { display: grid; grid-template-columns: 80px minmax(0,1fr); width: 100%; }
  .chip-template-card { padding: 10px; }
  .cast-play-chip-settings .chip-templates form { padding: 10px; }
}
