/* Alertes de prix (alerts.js) : fenêtre de création, page « Mes alertes », encadré des notifications */

.al-bell.active { color: var(--accent); }

/* Fenêtre */
.al-modal { max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.al-head { display: flex; align-items: center; gap: 12px; margin: 0 28px 16px 0; }
.al-head .logo-img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.al-head h2 { margin: 0; font-size: 19px; }
.al-form { display: flex; flex-direction: column; gap: 12px; }
.al-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.al-kinds button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 6px; font-size: 12.5px; white-space: nowrap; }
.al-kinds button .ic { width: 14px; height: 14px; flex: none; }
.al-kinds button:disabled { opacity: .35; cursor: default; }
.al-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.al-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); padding: 0 14px; transition: border-color .15s; }
.al-input:focus-within { border-color: var(--accent); }
.al-input input { flex: 1; min-width: 0; height: 50px; border: 0; background: none; padding: 0; font: 700 24px/1 inherit; font-family: inherit; color: var(--text); outline: none; box-shadow: none; }
.al-unit { font-size: 18px; color: var(--muted); }
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.al-chips button { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--text); font: 600 12.5px inherit; font-family: inherit; cursor: pointer; }
.al-chips button:hover { border-color: var(--accent); color: var(--accent); }
.al-hint { margin: 0; min-height: 1.4em; }
.al-note { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.al-note input { height: 38px; font-weight: 400; }
.al-channels { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.al-channels legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.al-channels label { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; cursor: pointer; }
.al-channels input[type=checkbox] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.al-channels label:has(input:disabled) { opacity: .55; }
.al-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; font-size: 15px; }
.al-submit .ic { width: 18px; height: 18px; }
.al-existing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.al-existing > b { width: 100%; }
.al-tag { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: rgb(var(--accent-rgb) / .12); color: var(--accent); }
.al-tag.is-paused { background: var(--panel-2); color: var(--muted); }
.al-hero { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 10px; border-radius: 18px; color: var(--accent); background: rgb(var(--accent-rgb) / .14); }
.al-hero .ic { width: 28px; height: 28px; }

/* Encadré des notifications */
.al-push { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 12px 14px; border: 1px solid rgb(var(--accent-rgb) / .35); border-radius: 14px; background: rgb(var(--accent-rgb) / .07); }
.al-push > .ic { flex: none; width: 22px; height: 22px; color: var(--accent); }
.al-push > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 13.5px; }
.al-push small { font-size: 12.5px; line-height: 1.45; }
.al-push button { flex: none; }
.al-push.is-on { border-color: rgb(34 197 94 / .4); background: rgb(34 197 94 / .07); }
.al-push.is-on > .ic { color: var(--up); }
.al-push.is-off { border-color: var(--border); background: var(--panel-2); }
.al-push.is-off > .ic { color: var(--muted); }
.al-push-actions { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; flex: none !important; }
.al-modal .al-push { margin: 0; }

/* Page */
.al-page { max-width: 820px; }
.al-sub { display: flex; gap: 8px; margin: 18px 0 8px; font-size: 14.5px; }
.al-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; }
.al-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.al-row + .al-row { border-top: 1px solid var(--border); }
.al-row.is-paused .al-row-main { opacity: .65; }
.al-row-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.al-row-main > span { display: flex; flex-direction: column; min-width: 0; }
.al-row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-row-main small { font-size: 12.5px; }
.al-row-note { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-row-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; text-align: right; }
.al-row-price .pill { font-size: 11px; }
.al-state { font-size: 11.5px; color: var(--accent); white-space: nowrap; }
.al-state.is-paused { color: var(--muted); }
.al-row-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.al-row-actions .icon-btn .ic { width: 16px; height: 16px; }
.al-empty { display: flex; flex-direction: column; align-items: center; padding: 32px 16px; text-align: center; }
.al-empty h2, .al-empty h3 { margin: 0 0 6px; }
.al-empty p { max-width: 440px; margin: 0 0 16px; line-height: 1.55; }
.al-empty p .ic { width: 15px; height: 15px; vertical-align: -2px; }
.al-foot { margin-top: 16px; line-height: 1.5; }

@media (max-width: 600px) {
  /* Fenêtre du bas sur téléphone */
  #alert-modal { align-items: flex-end; padding: 0; }
  .al-modal { max-width: none; max-height: 92dvh; border-radius: 22px 22px 0 0; border-bottom: 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); animation: al-up .28s cubic-bezier(.2,.9,.25,1); }
  @keyframes al-up { from { transform: translateY(100%); } }
  .al-head { margin-right: 36px; }
  .al-head .logo-img { width: 34px; height: 34px; }
  .al-kinds button { flex-direction: column; gap: 3px; font-size: 11.5px; }
  .al-row { flex-wrap: wrap; }
  .al-row-main { flex-basis: 100%; }
  .al-row-price { flex-direction: row; align-items: center; gap: 8px; flex: 1; justify-content: flex-start; flex-wrap: wrap; }
  .al-push { flex-wrap: wrap; }
}
