/* ==============================
   Montebello Ressursadmin – custom CSS
   Offisiell profilpalett 2026 (Dialecta Kommunikasjon AS)

   HOVEDFARGER
   --lilla:       #571454  (Indigo – Se ting i annet perspektiv)
   --lilla-mrk:   #330130  (Mørk lilla)
   --gronn:       #85af9a  (Grønn – Endring i livet, vekst)
   --graa:        #d1ccbd  (Grå – Vennskap, trygghet)

   TILLEGGSFARGER
   --gronn-mrk:   #006b5b  (Mørk grønn – Endring i livet, vekst)
   --orange:      #e69e6d  (Orange – Energi)
   --rod:         #ea6952  (Rød – Varme, lidenskap)
   --gul:         #d39200  (Varm gul – Helse, sol, optimisme)
   --blaa:        #4c858e  (Blå – Ro og harmoni)
   ============================== */

/* ── Grunnleggende typografi ─────────────────────────────────── */
body {
    color: #000;
    font-family: "source-sans-pro", Arial, sans-serif;
    font-style: normal;
    font-size: 1.1rem;
}

a { color: #000; }
a:hover { color: #571454; }

.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 { font-weight: 700; }

hr { border-top: 1px solid rgba(0,0,0,1); }

#wrapper #content-wrapper { background-color: #fff; }

/* ── Primærfarge (lilla) ─────────────────────────────────────── */
.bg-primary            { background-color: #571454 !important; }
.text-primary          { color: #571454 !important; }
.border-primary        { border-color: #571454 !important; }

/* ── Knapper ─────────────────────────────────────────────────── */
.btn {
    border-radius: 1.25rem;
    padding: 0.475rem 1.4rem;
    font-weight: 700;
}
/* WCAG 2.4.7 – synlig fokusindikator på knapper */
.btn:focus,
.btn.focus {
    outline: 3px solid #571454;
    outline-offset: 2px;
    box-shadow: none;
}
.btn-primary:focus,
.btn-outline-primary:focus  { outline-color: #571454; }
.btn-success:focus,
.btn-outline-success:focus  { outline-color: #006B5B; }
.btn-dark:focus,
.btn-outline-dark:focus     { outline-color: #000; }
.btn-light:focus            { outline-color: #8a7f6e; }

/* WCAG 2.4.7 – synlig fokus på alle interaktive elementer */
a:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #571454;
    outline-offset: 2px;
}

/* Skjul visuelt, men behold for skjermleser (brukes til skip-lenke og sr-only labels) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* WCAG 2.4.1 – hopp til innhold */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: #571454;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 4px 4px;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.1s;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #000;
}

.btn-primary {
    color: #fff;
    background-color: #571454;
    border-color: #571454;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #3d0e3b;
    border-color: #3d0e3b;
    color: #fff;
}
.btn-outline-primary {
    color: #571454;
    border-color: #571454;
}
.btn-outline-primary:hover {
    background-color: #571454;
    border-color: #571454;
    color: #fff;
}

.btn-success {
    color: #fff;
    background-color: #006B5B;
    border-color: #006B5B;
}
.btn-success:hover,
.btn-success:focus {
    background-color: #004d41;
    border-color: #004d41;
    color: #fff;
}
.btn-outline-success {
    color: #006B5B;
    border-color: #006B5B;
}
.btn-outline-success:hover {
    background-color: #006B5B;
    border-color: #006B5B;
    color: #fff;
}

.btn-light {
    color: #000;
    background-color: #D1CCBD;
    border-color: #D1CCBD;
}
.btn-light:hover {
    background-color: #b8b3a5;
    border-color: #b8b3a5;
}

.btn-dark {
    color: #fff;
    background-color: #000;
    border-color: #000;
}
.btn-outline-dark {
    color: #000;
    border-color: #000;
}
.btn-outline-dark:hover {
    background-color: #000;
    color: #fff;
}

.btn-link        { color: #000; }
.btn-link:hover  { color: #571454; }

.btn-sm {
    padding: 0.275rem 0.9rem;
    border-radius: 1rem;
}
.btn-xs {
    padding: .15rem .5rem;
    font-size: .75rem;
    line-height: 1.2;
    border-radius: .8rem;
}

/* ── Badge ───────────────────────────────────────────────────── */
.badge-primary    { background-color: #571454; color: #fff; }
.badge-success    { background-color: #006B5B; color: #fff; }
/* Montebello tilleggsfarger (2026-profil) */
.badge-mtb-orange { background-color: #e69e6d; color: #111; }
.badge-mtb-red    { background-color: #ea6952; color: #fff; }
.badge-mtb-yellow { background-color: #d39200; color: #fff; }
.badge-mtb-teal   { background-color: #4c858e; color: #fff; }
.badge-mtb-green  { background-color: #85af9a; color: #111; }

/* ── Aktivitetskategori-farger (kalender og listevisning) ──────── */
.cat-yellow { background-color: #d39200; }  /* Varm gul  */
.cat-blue   { background-color: #4c858e; }  /* Blå       */
.cat-red    { background-color: #ea6952; }  /* Rød       */
.cat-orange { background-color: #e69e6d; }  /* Orange    */
.cat-green  { background-color: #85af9a; }  /* Grønn     */
.cat-purple { background-color: #571454; }  /* Lilla     */
.cat-teal   { background-color: #006b5b; }  /* Mørk grønn */

/* ── Skjemaelementer ─────────────────────────────────────────── */
.form-control {
    border-radius: 0;
    font-size: 1rem;
    color: #000 !important;
}
.form-control:focus {
    border-color: #571454;
    box-shadow: 0 0 0 0.2rem rgba(87,20,84,0.15);
}
.custom-select-sm,
.form-control-sm { font-size: 1rem; }

.input-group-text {
    color: #fff;
    background-color: #000;
    border: 1px solid #000;
    border-radius: 0;
}

.custom-select {
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23000000' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 1.2rem center/8px 10px no-repeat;
}

/* ── Paginering ──────────────────────────────────────────────── */
.page-item.active .page-link {
    color: #fff;
    background-color: #571454;
    border-color: #571454;
}
.page-link { color: #571454; }
.page-link:hover { color: #3d0e3b; }

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebarToggle          { background-color: rgba(255,255,255,0.2); }
#sidebarToggle:hover    { background-color: rgba(255,255,255,0.35); }

.sidebar .nav-item.activemenu .nav-link {
    background-color: rgba(255,255,255,0.15);
    border-left: 4px solid #fff;
}

.sidebar-logo-full  { display: block; }
.sidebar-logo-small { display: none; }
.sidebar.toggled .sidebar-logo-full  { display: none; }
.sidebar.toggled .sidebar-logo-small { display: block; }

@media (min-width: 768px) {
    .sidebar .nav-item .nav-link span {
        font-size: 1.4rem;
        display: inline;
        font-weight: 700;
    }
    .sidebar.toggled .nav-item .nav-link span { font-size: .85rem; }
    .sidebar .nav-item      { padding-left: 1rem; }
    .sidebar.toggled .nav-item { padding-left: 0; }
}

/* ── Topbar / profilbilde ────────────────────────────────────── */
.img-profile { width: 2rem; height: 2rem; object-fit: cover; }

/* ── Innloggingsside ─────────────────────────────────────────── */
.bg-login-image {
    background: url(/image/innlogging.jpg) center/cover no-repeat;
}

/* ── Tabeller ────────────────────────────────────────────────── */
.table { color: #000; }

.table thead th {
    color: #fff;
    background-color: #571454;
    border-bottom: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.table td, .table th {
    padding: 0.25rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #e3e6f0;
}
.table td { font-size: .9em; }

/* DataTables */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label { font-weight: 700 !important; }
div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 25px;
    border: 1px solid #000;
    padding-left: 0.75em;
}

/* ── FullCalendar ────────────────────────────────────────────── */
#calendar {
    width: 100%;
    overflow-x: auto;
}
.fc-view { min-width: 900px; }

#calendar thead {
    background-color: #571454 !important;
    color: #fff;
}
#calendar thead a {
    color: #fff;
    font-size: 1.1rem;
}

.fc-event          { border-radius: 4px !important; font-size: .82rem; border: 0; }
.fc-event-title    { font-weight: 600; }
.fc-v-event        { border: 0; }
a.fc-v-event:hover { color: #000; }

.fc-timegrid-event .fc-event-main {
    padding: 5px 5px 0;
    color: #000;
    overflow: hidden;
}

.fc .fc-button-primary {
    background-color: #D1CCBD;
    border-color: #D1CCBD;
    color: #000;
}
.fc .fc-button-primary:hover,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #571454;
    border-color: #571454;
    color: #fff;
}
.fc .fc-button-group > .fc-button,
.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child),
.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) {
    border-radius: 25px;
}
.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) { margin-left: 15px; }
.fc .fc-button        { padding: 7px; }
.fc .fc-toolbar-title { font-size: 1.5em; }
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 1em; padding: 0 10px; }
.fc-daygrid-event     { white-space: normal; }

/* ── Aktivitetsmodalens kollaps-seksjoner ────────────────────── */
#activityModal .collapse,
#taskModal .collapse {
    border: 1px solid #d1d3e2;
    border-bottom: 2px solid #571454 !important;
    background-color: #f8f4f8 !important;
    margin-bottom: 1rem;
}
#activityModal .form-check,
#taskModal .form-check {
    border: 1px solid #d1d3e2;
    border-top: 0;
    padding: 3px 33px;
}
#activityModal a:hover,
#taskModal a:hover {
    text-decoration: none;
    color: inherit;
}
.form-check-input { margin-top: 0.4rem; }

/* ── Konfliktvarsler ─────────────────────────────────────────── */
.fa-exclamation-circle { color: #dc3545; }

/* ── Søkefelt ────────────────────────────────────────────────── */
#searchInput:focus, #searchAct:focus {
    border-color: #571454;
    box-shadow: 0 0 0 0.2rem rgba(87,20,84,0.15);
}

/* ── Romplan ─────────────────────────────────────────────────── */
.roomplan-cell { min-width: 120px; }

/* ── Utskrift ────────────────────────────────────────────────── */
@media print {
    .d-print-none   { display: none !important; }
    #wrapper        { padding-left: 0 !important; }
    #content-wrapper { width: 100% !important; }
    .information    { page-break-inside: avoid; }
    #calendar thead { background-color: #571454 !important; -webkit-print-color-adjust: exact; }
}
