/* 가격 알림: 만들기 창 · 오른쪽 패널 목록 · 울림 카드 */

/* ---------- 만들기 창 ---------- */
.al-dlg { width: min(460px, calc(100vw - 24px)); max-height: 86vh; }
.al-body { padding: 4px 16px 8px; }
.al-sec { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.al-sec:last-child { border-bottom: 0; }
.al-lab { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); }
.al-cond { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.al-cond .inp, .al-exp .inp, .al-dlg .field input { height: 34px; width: 100%; min-width: 0; font-size: var(--fs); }
.al-cond select.inp { padding: 0 6px; }
.al-sym { font-weight: 700; }
.al-sym[readonly] { color: var(--text-2); }
.al-fixed { font-size: var(--fs-sm); color: var(--text-2); padding: 0 2px; }
.al-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.al-vals .al-v2[hidden] { display: none; }
.al-vals:has(.al-v2[hidden]) { grid-template-columns: 1fr; }
.al-vals input { font-variant-numeric: tabular-nums; }
.al-cur { font-size: var(--fs-xs); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.al-cur b { color: var(--text); font-variant-numeric: tabular-nums; }
.al-link { color: var(--brand-2); font-size: var(--fs-xs); padding: 0; background: none; border: 0; cursor: pointer; }
.al-link:hover { text-decoration: underline; }
.al-trig button { padding: 6px 4px; }
.al-hint { font-size: var(--fs-xs); line-height: 1.5; }
.al-exp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.al-exp .inp:disabled { opacity: .45; }
.al-exp input[type="datetime-local"] { color-scheme: dark; }
:root[data-theme="light"] .al-exp input[type="datetime-local"] { color-scheme: light; }
.al-msg { width: 100%; min-height: 54px; height: auto; padding: 8px 10px; resize: vertical; font: inherit; font-size: var(--fs-sm); line-height: 1.5; }
.al-notify { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.al-chk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text); cursor: pointer; white-space: nowrap; }
.al-chk input { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; }
.al-chk input:disabled + span { opacity: .5; }
.al-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.al-foot .sp { flex: 1; }
.al-foot .btn { height: 32px; padding: 0 14px; }
.al-note { font-size: var(--fs-xs); }

/* ---------- 오른쪽 패널 ---------- */
.al-panel-head { gap: 8px; }
.al-new { justify-content: center; height: 32px; }
.al-tabs { display: flex; align-items: center; gap: 6px; }
.al-tabs .sp { flex: 1; }
.al-cnt { font-size: 10px; color: var(--text-3); margin-left: 3px; font-variant-numeric: tabular-nums; }
.al-clear { color: var(--text-3); }
.al-clear:hover { color: var(--down); }
.al-item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 8px 9px 12px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.al-item:hover { background: var(--hover); }
.al-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--up); }
.st-paused .al-dot { background: var(--text-3); }
.st-fired .al-dot, .al-dot.fired { background: var(--warn); }
.st-expired .al-dot { background: var(--line-2); }
.al-main { flex: 1; min-width: 0; display: grid; gap: 2px; cursor: pointer; }
.al-l1 { display: flex; align-items: center; gap: 6px; }
.al-l2 { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.al-l3 { font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-time { font-size: var(--fs-xs); margin-left: auto; }
.al-st { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: var(--up-bg); color: var(--up); }
.st-paused .al-st { background: var(--hover); color: var(--text-3); }
.st-fired .al-st { background: rgba(240, 185, 11, .14); color: var(--warn); }
.st-expired .al-st { background: var(--hover); color: var(--text-3); }
.st-paused .al-l2, .st-expired .al-l2 { color: var(--text-3); }
.al-acts { display: flex; gap: 2px; flex: none; opacity: .55; transition: opacity .12s; }
.al-item:hover .al-acts, .al-acts:focus-within { opacity: 1; }
.al-acts .tool { width: 26px; height: 26px; }
.al-acts .tool .ico { width: 14px; height: 14px; }
.al-acts [data-act="del"]:hover { color: var(--down); }
#alertList .empty .ico { display: block; margin: 0 auto 10px; }
.al-log-msg { max-width: 320px; overflow: hidden; text-overflow: ellipsis; text-align: left !important; }

/* ---------- 울림 카드 ---------- */
.al-toasts { position: fixed; top: calc(var(--topbar-h) + 10px); right: 16px; z-index: 96; display: grid; gap: 8px; width: min(320px, calc(100vw - 32px)); pointer-events: none; }
.al-card { pointer-events: auto; background: var(--win); border: 1px solid var(--line-2); border-left: 3px solid var(--warn); border-radius: var(--r-lg); box-shadow: var(--shadow); font-size: var(--fs-sm); overflow: hidden; animation: alIn .22s ease-out; }
.al-card.out { opacity: 0; transform: translateX(16px); transition: opacity .18s, transform .18s; }
.al-card-h { display: flex; align-items: center; gap: 6px; padding: 9px 8px 0 12px; }
.al-card-h .ico { width: 15px; height: 15px; color: var(--warn); }
.al-card-h .dim { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.al-card-h .sp { flex: 1; }
.al-x { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; color: var(--text-3); background: none; border: 0; cursor: pointer; }
.al-x:hover { background: var(--hover); color: var(--text); }
.al-x .ico { width: 14px; height: 14px; color: inherit; }
.al-card-b { padding: 6px 12px 10px; display: grid; gap: 4px; }
.al-card-sym { font-size: var(--fs-lg); font-weight: 800; }
.al-card-name { color: var(--text-2); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-card-row { display: flex; justify-content: space-between; gap: 10px; }
.al-card-row span { color: var(--text-3); }
.al-card-row b { font-variant-numeric: tabular-nums; text-align: right; }
.al-card-msg { margin-top: 4px; padding: 7px 9px; background: var(--win-2); border-radius: var(--r); color: var(--text-2); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.al-card-f { display: flex; align-items: center; gap: 6px; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.al-card-f .sp { flex: 1; }
@keyframes alIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .al-toasts { top: calc(var(--topbar-h) + 8px); right: 12px; left: 12px; width: auto; }
  .al-acts { opacity: 1; }
  #alertOv { padding-top: 4vh; }
  .al-dlg { max-height: 90vh; }
}
@media (max-width: 420px) {
  .al-cond { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .al-fixed { display: none; }
  .al-foot .al-note { display: none; }
}
@media (max-width: 860px) { .al-card:nth-child(n+3) { display: none; } .al-card-b { padding-bottom: 8px; } }
