/* ==========================================================================
   Jobriver v2 – Dialog „Job-Alert erstellen“ (gemeinsam: /jobs, /job-alerts)
   Markup: partials/job-alert-dialog-v2.php · Verhalten: assets/js/job-alert-v2.js
   Styleguide: docu/design/v2-styleguide.md (Formulare 6.8, Dark Mode 8, A11y 9)
   ========================================================================== */

.jad { width: min(520px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain; }
.jad[open] { animation: jadIn .3s var(--ease); }
.jad::backdrop { background: rgba(21, 17, 31, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes jadIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.jad [hidden] { display: none !important; }

.jad__x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.jad__x:hover { background: var(--tint); color: var(--ink); }
.jad__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.jad__head { display: flex; align-items: flex-start; gap: 14px; padding: 26px 64px 0 26px; }
.jad__ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 15px; background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px var(--brand); }
.jad__ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jad__t { font-size: 1.375rem; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.jad__s { margin-top: 4px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }

.jad__body { display: block; padding: 22px 26px 26px; }
.jad__label { margin-bottom: 10px; padding: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jad__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.jad__tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 34px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-700); font-size: .875rem; font-weight: 550; }
.jad__tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jad__tag button { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.jad__tag button:hover { background: rgba(114, 79, 255, .14); }
.jad__tag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.jad__empty { padding: 12px 14px; border-radius: 12px; background: var(--tint); color: var(--ink-2); font-size: .9375rem; }

.jad__freq { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.jad__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jad__opt { position: relative; display: block; cursor: pointer; }
.jad__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.jad__box { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; height: 100%; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.jad__box svg { width: 20px; height: 20px; margin-bottom: 6px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jad__box b { font-size: .9375rem; font-weight: 600; }
.jad__box small { font-size: .8125rem; color: var(--muted); }
.jad__opt:hover .jad__box { border-color: var(--brand-200); }
.jad__opt input:checked + .jad__box { border-color: var(--brand); background: var(--brand-50); }
.jad__opt input:checked + .jad__box svg { stroke: var(--brand-700); }
.jad__opt input:focus-visible + .jad__box { box-shadow: 0 0 0 4px rgba(114, 79, 255, .2); }

.jad__err { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: color-mix(in oklab, #c2255c 10%, var(--surface)); color: #a3174c; font-size: .9375rem; }
:root[data-theme="dark"] .jad__err { color: #ff8db5; }
.jad__submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 22px; }
.jad__submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jad__submit.is-busy { opacity: .7; cursor: progress; }

.jad__guest-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jad__guest-actions .btn { flex: 1 1 180px; justify-content: center; }
.jad__guest-note { margin-top: 16px; font-size: .9375rem; color: var(--muted); }
.jad__guest-note a { font-weight: 600; color: var(--brand-700); }

.jad__done { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 30px; }
.jad__check { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in oklab, var(--mint) 16%, var(--surface)); color: var(--mint); }
.jad__check svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.jad__done-t { margin-top: 14px; font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.jad__done-p { margin-top: 6px; color: var(--ink-2); }

@media (max-width: 480px) {
    .jad { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
    .jad[open] { animation-name: jadUp; }
    @keyframes jadUp { from { transform: translateY(40px); opacity: 0; } }
    .jad__head { padding: 22px 60px 0 20px; }
    .jad__body { padding: 20px; }
    .jad__opts { grid-template-columns: minmax(0, 1fr); }
    .jad__box { flex-direction: row; align-items: center; gap: 10px; }
    .jad__box svg { margin: 0; }
    .jad__box small { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .jad[open] { animation: none; }
}
