/* ALMK — sitets eget tema oven på Bootstrap */
:root {
    --almk-primary: #1a3a5c;   /* mørkeblå */
    --almk-accent: #e8541d;    /* motocross-orange */
    --almk-dark: #14212e;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 1 auto; }

.site-nav { background: var(--almk-primary); }
.site-nav .nav-link { color: #fff; padding-left: .6rem; padding-right: .6rem; font-size: .95rem; white-space: nowrap; }
.site-nav .nav-link:hover { color: #ffd9c7; }
.site-nav .navbar-brand { font-size: 1.05rem; }
@media (min-width: 992px) and (max-width: 1250px) {
    .site-nav .nav-link { padding-left: .4rem; padding-right: .4rem; font-size: .88rem; }
}

.hero {
    background:
        linear-gradient(rgba(20, 33, 46, .72), rgba(20, 33, 46, .72)),
        url('/assets/img/dronefoto.jpg') center/cover no-repeat,
        linear-gradient(135deg, var(--almk-primary) 0%, var(--almk-dark) 100%);
}
.hero .lead { color: #ffd9c7; }

.btn-primary {
    background: var(--almk-accent);
    border-color: var(--almk-accent);
}
.btn-primary:hover { background: #c94517; border-color: #c94517; }

.site-footer { background: var(--almk-dark); color: #cfd8e3; }
.site-footer a { color: #ffd9c7; }

.visibility-badge {
    font-size: .85rem;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    padding: .1rem .6rem;
    white-space: nowrap;
    cursor: help;
}

.impersonation-banner {
    background: #ffc107;
    color: #212529;
    font-size: .95rem;
}

.cookie-banner {
    position: fixed;
    inset: auto 0 0 0;
    background: #fff;
    border-top: 3px solid var(--almk-accent);
    z-index: 1080;
}

.page-content img { max-width: 100%; height: auto; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.page-content table td, .page-content table th { border: 1px solid #dee2e6; padding: .5rem; }

/* ---- ALMK-botten: bobler, flydende knap og panel ---- */
.chat-msg { padding: .5rem .8rem; border-radius: .8rem; margin-bottom: .5rem; max-width: 85%; white-space: pre-wrap; }
.chat-user { background: var(--almk-primary); color: #fff; margin-left: auto; }
.chat-assistant { background: #f1f3f5; }
.chat-pending { color: #6c757d; font-style: italic; }
.chat-action {
    background: #fff8e1;
    border: 1px solid #ffe08a;
    border-radius: .8rem;
    padding: .6rem .8rem;
    margin-bottom: .5rem;
    font-size: .95rem;
}

.chat-launcher {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1050;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #fff;
    background: var(--almk-primary);
    box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .3);
}
.chat-launcher:hover { filter: brightness(1.1); }

.chat-panel {
    position: fixed;
    right: 1rem;
    bottom: 5rem;
    z-index: 1050;
    width: min(23rem, calc(100vw - 2rem));
    max-height: min(32rem, calc(100vh - 7rem));
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: .8rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3);
    overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel-head {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .5rem .75rem;
    background: var(--almk-primary);
    color: #fff;
}
.chat-panel-head a { color: #fff; text-decoration: underline; }
.chat-panel-log { flex: 1 1 auto; overflow-y: auto; padding: .75rem; }
.chat-panel-form { display: flex; gap: .5rem; padding: .5rem; border-top: 1px solid #dee2e6; }

@media (max-width: 575.98px) {
    .chat-panel { right: .5rem; left: .5rem; width: auto; bottom: 4.75rem; }
}

/* Sorterbare tabeller — overskriften kan klikkes, og pilen viser retningen */
th.sortbar{cursor:pointer;user-select:none;white-space:nowrap}
th.sortbar:hover{text-decoration:underline}
th.sortbar::after{content:"⇅";opacity:.35;margin-left:.3em;font-size:.85em}
th.sortbar.sorteret-op::after{content:"▲";opacity:1}
th.sortbar.sorteret-ned::after{content:"▼";opacity:1}

/* Billeder i sidernes tekst — samme klasser som tekst-editoren tilbyder.
   Ombrydningen slås fra på små skærme: en tekstspalte på en telefon har ikke
   plads til både billede og tekst ved siden af hinanden. */
.side-indhold img, .page-content img { max-width: 100%; height: auto; }
.img-venstre { float: left; margin: .25rem 1.25rem .75rem 0; max-width: 50%; }
.img-hoejre { float: right; margin: .25rem 0 .75rem 1.25rem; max-width: 50%; }
.img-midt { display: block; margin: 1rem auto; }
.img-fuld { display: block; width: 100%; margin: 1rem 0; }
@media (max-width: 575.98px) {
    .img-venstre, .img-hoejre { float: none; display: block; margin: 1rem auto; max-width: 100%; }
}

/* Kvittering for handlinger, der gemmes uden at siden hentes forfra */
.ajax-kvittering{position:fixed;right:1rem;bottom:1rem;z-index:1080;background:#146c43;color:#fff;
  padding:.55rem .9rem;border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.25);font-size:.9rem;
  max-width:22rem}
.ajax-kvittering.er-fejl{background:#b02a37}
