/* Automation editor tabs (Trigger and Run): cards, fields, segmented choices, day chips and switches. */
.atab { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.atab [hidden], .atab[hidden] { display: none !important; }
.atab-stack { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.atab-stack > .atab-field { align-self: stretch; }
.atab-card { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.atab-card > header { display: flex; flex-direction: column; gap: 2px; }
.atab-card h3 { margin: 0; font: 600 15px var(--serif); color: var(--heading, var(--text)); }
.atab-hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.atab-address { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.atab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; }
.atab-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.atab-field > span:first-child { color: var(--text); font-weight: 600; font-size: 13px; }
.atab-field :is(input, select, textarea) { width: 100%; }
.atab-field textarea { resize: vertical; }

.atab .atab-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; align-self: flex-start; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-ctl); }
.atab .atab-seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 13px; border-radius: 8px; box-shadow: none; font-size: 13px; }
.atab .atab-seg button:hover:not(:disabled) { color: var(--text); }
.atab .atab-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.atab .atab-seg button:disabled { opacity: 0.55; cursor: default; }

.atab-days { display: flex; flex-wrap: wrap; gap: 6px; }
.atab .atab-days button { min-width: 46px; padding: 7px 0; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); color: var(--muted); font-size: 13px; box-shadow: none; }
.atab .atab-days button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 15%, var(--field)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.atab-toggle { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: var(--field); color: var(--text); cursor: pointer; }
.atab-toggle.plain { padding: 0; border: 0; background: none; }
.atab-toggle:has(:disabled) { opacity: 0.55; cursor: default; }
.atab-toggle b { display: block; font-size: 13.5px; font-weight: 600; }
.atab-toggle small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.atab .atab-switch { appearance: none; flex: none; position: relative; width: 36px; height: 21px; min-width: 36px; margin: 1px 0 0; padding: 0; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-strong); cursor: inherit; }
.atab .atab-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: transform 0.15s; }
.atab .atab-switch:checked { background: color-mix(in srgb, var(--accent) 35%, var(--field)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.atab .atab-switch:checked::after { transform: translateX(15px); background: var(--accent); }
.atab .atab-switch:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .atab .atab-switch::after { transition: none; } }
