/* ORBIT v3.12.0 -- the Orbit dialog (see static/js/orbit-dialog.js).

   Self-contained on purpose: it is loaded on pages that do not load app.css
   (public_app_base.html), so every colour has a fallback and the buttons are
   styled here, scoped under .od-box, rather than relying on .btn existing.
   Orange is a FILL only, with Core Ink text on it (6.9:1). */

html.od-lock, html.od-lock body { overflow: hidden; }

.od-backdrop {
    position: fixed; inset: 0; z-index: 2147483000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(20, 24, 31, .52);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    animation: od-fade .14s ease-out;
}
.od-backdrop.od-leaving { animation: od-fade-out .12s ease-in forwards; }

.od-box {
    width: 100%; max-width: 440px;
    background: #fff;
    color: var(--ink, #14181F);
    border-radius: var(--card-radius, 14px);
    border: 1px solid var(--line, #D8DDE3);
    box-shadow: 0 24px 60px rgba(20, 24, 31, .28), 0 2px 8px rgba(20, 24, 31, .10);
    font-family: var(--font-body, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    overflow: hidden;
    animation: od-rise .18s cubic-bezier(.2, .9, .3, 1.2);
    outline: none;
}
.od-backdrop.od-leaving .od-box { animation: od-sink .12s ease-in forwards; }

/* The orange rule across the top is the Orbit signature; red for danger. */
.od-box::before {
    content: ""; display: block; height: 4px;
    background: var(--brand, #5B6CFF);
}
.od-box.od-danger::before { background: var(--crit, #C2261B); }

.od-head {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 22px 6px;
}
.od-icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.od-icon svg { display: block; }
.od-icon-confirm { background: rgba(91, 108, 255, .14); color: var(--brand-text, #3A47C9); }
.od-icon-info    { background: #EEF2F7; color: #2B333D; }
.od-icon-danger  { background: #FDECEA; color: var(--crit, #C2261B); }

.od-title {
    margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700;
    font-family: var(--font-head, "Schibsted Grotesk", system-ui, sans-serif);
    color: var(--ink, #14181F);
}

.od-msg {
    padding: 4px 22px 4px 74px;
    font-size: 14px; line-height: 1.55;
    color: var(--ink-grey, #2B333D);
    overflow-wrap: anywhere;
    max-height: 50vh; overflow-y: auto;
}
.od-msg p { margin: 0 0 8px; }
.od-msg p:last-child { margin-bottom: 0; }

.od-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 18px 22px 20px;
}

.od-box .btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 96px; padding: 9px 18px;
    border-radius: var(--btn-radius, 999px); border: 1px solid transparent;
    font: 600 13.5px/1.2 var(--font-body, system-ui, sans-serif);
    cursor: pointer; transition: background .15s, filter .15s, box-shadow .15s;
}
.od-box .btn:active { transform: translateY(1px); }
.od-box .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(91, 108, 255, .35); }
.od-box .btn-light  { background: #fff; color: var(--ink, #14181F); border-color: var(--line, #D8DDE3); }
.od-box .btn-light:hover { background: #F1F3F5; }
.od-box .btn-primary { background: var(--brand, #5B6CFF); color: var(--brand-on, #14181F); }
.od-box .btn-primary:hover { background: var(--brand-dark, #4655E6); }
.od-box .btn-danger { background: var(--crit, #C2261B); color: #fff; }
.od-box .btn-danger:hover { filter: brightness(.92); }
.od-box .btn-danger:focus-visible { box-shadow: 0 0 0 3px rgba(194, 38, 27, .30); }

@media (max-width: 520px) {
    .od-backdrop { align-items: flex-end; padding: 0; }
    .od-box { max-width: none; border-radius: 16px 16px 0 0; }
    .od-msg { padding-left: 22px; }
    .od-foot { flex-direction: column-reverse; }
    .od-box .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .od-backdrop, .od-box, .od-backdrop.od-leaving, .od-backdrop.od-leaving .od-box { animation: none; }
}

@keyframes od-fade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes od-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes od-rise { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes od-sink { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px) scale(.98); } }
