/* Scoped styles: do not change the existing manual tide controls. */
.faf-presets { --bg-card: var(--bg-container, #fff); --preset-accent: #096b70; margin: 18px 0; padding: 20px; color: var(--text-main, #15323d); background: var(--bg-card, #fff); border: 1px solid var(--border-medium, #d6e3e6); border-radius: 12px; text-align: left; }
.faf-presets * { box-sizing: border-box; }
.faf-presets h3 { margin: 0 0 8px; font-size: 1.15rem; color: inherit; }
.faf-presets-hint, .faf-presets-empty { color: var(--text-secondary, #4c626c); font-size: .92rem; line-height: 1.5; margin: 6px 0 14px; }
.faf-presets-list { display: grid; gap: 8px; margin-bottom: 16px; }
.faf-presets-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px; border: 1px solid var(--border-medium, #d6e3e6); border-radius: 8px; background: var(--bg-body, #f4f8f9); }
.faf-presets-description { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.faf-presets-delay { display: block; margin-top: 3px; font-size: .88rem; color: var(--text-secondary, #4c626c); }
.faf-presets button { width: auto; min-height: 44px; padding: 10px 15px; border-radius: 8px; border: 1px solid var(--preset-accent); background: var(--preset-accent); color: #fff; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.faf-presets button.faf-presets-secondary { color: var(--text-main, #15323d); background: var(--bg-card, #fff); border-color: var(--border-medium, #bdcfd4); }
.faf-presets button[aria-pressed="true"] { background: #14542f; border-color: #14542f; }
.faf-presets button:disabled { opacity: .55; cursor: default; }
.faf-presets button:focus-visible, .faf-presets input:focus-visible, .faf-presets select:focus-visible, .faf-presets a:focus-visible { outline: 3px solid #26a8bb; outline-offset: 3px; }
.faf-presets-form { display: grid; gap: 8px; margin-top: 18px; }
.faf-presets-form label { font-weight: 600; }
.faf-presets input, .faf-presets select { width: 100%; min-height: 44px; margin: 0 0 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-medium, #bdcfd4); background: var(--bg-input, #fff); color: var(--text-main, #15323d); font: inherit; }
.faf-presets-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.faf-presets-status { font-size: .9rem; line-height: 1.5; margin: 14px 0 4px; min-height: 1.5em; color: var(--text-secondary, #4c626c); overflow-wrap: anywhere; }
.faf-presets-error { color: var(--error-color, #ad2433); }
.faf-presets-examples { border-top: 1px solid var(--border-medium, #d6e3e6); margin-top: 20px; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.faf-presets-examples p { flex-basis: 100%; margin-bottom: 0; }
.faf-presets-manage { display: inline-block; padding: 6px 0; color: var(--primary-color, #096b70); text-decoration: underline; text-underline-offset: 3px; }
.faf-presets [hidden] { display: none !important; }
@media (max-width: 480px) { .faf-presets { padding: 15px; } .faf-presets-row { padding: 10px; } }

/* The exact server-confirmed active identity, not a match on numeric delay. */
.faf-presets-row.is-in-use { background: #e8f6ed; border-color: #17663a; box-shadow: inset 5px 0 0 #17663a; }
.faf-presets-row.is-in-use strong { color: #153d28; }
.faf-presets-row.is-in-use .faf-presets-delay { color: #245a3b; }
.faf-presets-in-use { display: inline-flex; align-items: center; margin: 0 0 3px 8px; padding: 3px 7px; border-radius: 5px; background: #17663a; color: #fff; font-size: .8rem; line-height: 1.4; font-weight: 700; white-space: nowrap; }
[data-theme="dark"] .faf-presets-row.is-in-use { background: #173b2a; border-color: #6bd698; box-shadow: inset 5px 0 0 #6bd698; }
[data-theme="dark"] .faf-presets-row.is-in-use strong { color: #f0fff5; }
[data-theme="dark"] .faf-presets-row.is-in-use .faf-presets-delay { color: #c4ead4; }
[data-theme="dark"] .faf-presets-in-use { background: #9de8b8; color: #102b1b; }
@media (forced-colors: active) { .faf-presets-row.is-in-use { outline: 3px solid Highlight; outline-offset: -3px; box-shadow: none; } .faf-presets-in-use { background: Highlight; color: HighlightText; } }
