﻿@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600&display=swap");
*,
*::before,
*::after {
  box-sizing: border-box;
}

.base-layout {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: 70px 1fr;
  transition: 0.5s;
  height: 100%;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .base-layout {
    display: flex;
    flex-direction: column;
  }
}
.base-layout.full-side-nav {
  grid-template-columns: 170px 1fr;
  grid-template-rows: 70px 1fr;
  transition: 0.5s;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .base-layout.full-side-nav {
    display: flex;
    flex-direction: column;
  }
}

.top-nav {
  background-color: #1B1424;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}
.top-nav img.mobile-menu {
  display: none;
}
.top-nav .tenant-menu {
  display: none;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav {
    justify-content: space-between;
  }
  .top-nav .tenant-menu {
    background-color: #1B1424;
    display: inline-flex;
    color: #EDF3EC;
  }
  .top-nav img.mobile-menu {
    display: block;
    margin: 20px;
  }
}
.top-nav .nav-logo {
  margin-right: 12px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav .nav-logo {
    margin: 20px;
  }
}

.top-nav-edge {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 70px 70px 0;
  border-color: transparent #1b1424 transparent transparent;
  background-color: #EDF3EC;
  z-index: 2;
  transition: width 0.5s;
  box-sizing: content-box;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav-edge {
    display: none;
  }
}
.full-side-nav .top-nav-edge {
  width: 100px;
  transition: width 0.5s;
}

.top-nav-name {
  color: #EDF3EC;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  z-index: 2;
  transition: width 0.5s;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav-name {
    display: none;
  }
  .top-nav-name .tenant-menu {
    display: none;
  }
}
.top-nav-name .tenant-menu {
  background-color: #1B1424;
  margin-left: 20px;
  display: inline-flex;
  color: #EDF3EC;
}

.side-nav {
  background-color: #EDF3EC;
  box-shadow: 4px 0 4px rgba(0, 0, 0, 0.25);
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .side-nav {
    display: none;
  }
  .side-nav.open-mobile {
    display: block;
  }
}

.nav-items {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  gap: 50px;
  margin-top: 70px;
  position: sticky;
  top: 70px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .nav-items {
    margin-top: 0;
    gap: 20px;
  }
}

.nav-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  z-index: 2;
  transition: width 0.5s;
  overflow: hidden;
  text-decoration: none;
  font-size: 16px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .nav-item {
    width: 150px;
    transition: width 0.5s;
    justify-content: normal;
  }
}
.full-side-nav .nav-item {
  width: 150px;
  transition: width 0.5s;
  justify-content: normal;
}
.main-content .nav-item {
  width: 160px;
}
@media only screen and (min-width: 768px) and (min-height: 700px) {
  .nav-item.active:before {
    background-color: #1B1424;
    content: "";
    border-radius: 10px;
    width: 50px;
    height: 50px;
    position: absolute;
    z-index: 1;
    transition: width 0.5s;
  }
  .side-nav .nav-item.active:before {
    left: 10px;
  }
  .full-side-nav .nav-item.active:before {
    width: 150px;
    transition: width 0.5s;
  }
  .main-content .nav-item.active:before {
    width: 160px;
  }
}
@media only screen and (min-width: 768px) and (min-height: 700px) {
  .nav-item.active span {
    color: #EDF3EC;
  }
}
.nav-item span {
  z-index: 2;
  color: #1B1424;
  margin-left: 10px;
}
.main-content .nav-item span {
  margin: 0;
}

.nav-icon {
  background-color: #1B1424;
  width: 40px;
  height: 40px;
  z-index: 2;
  flex: none;
}
@media only screen and (min-width: 768px) and (min-height: 700px) {
  .active .nav-icon {
    background-color: #EDF3EC;
  }
}
.nav-icon.home-icon {
  -webkit-mask: url(/icons/home.svg) no-repeat center;
  mask: url(/icons/home.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.planning-icon {
  -webkit-mask: url(/icons/planning.svg) no-repeat center;
  mask: url(/icons/planning.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.contacts-icon {
  -webkit-mask: url(/icons/contact.svg) no-repeat center;
  mask: url(/icons/contact.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.users-icon {
  -webkit-mask: url(/icons/users.svg) no-repeat center;
  mask: url(/icons/users.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.settings-icon {
  -webkit-mask: url(/icons/settings.svg) no-repeat center;
  mask: url(/icons/settings.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.logout-icon {
  -webkit-mask: url(/icons/logout.svg) no-repeat center;
  mask: url(/icons/logout.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.report-icon {
  -webkit-mask: url(/icons/report.svg) no-repeat center;
  mask: url(/icons/report.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.profile-icon {
  -webkit-mask: url(/icons/profile.svg) no-repeat center;
  mask: url(/icons/profile.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.gdpr-icon {
  -webkit-mask: url(/icons/gdpr.svg) no-repeat center;
  mask: url(/icons/gdpr.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.component-forecast-icon {
  -webkit-mask: url(/icons/component-forecast.svg) no-repeat center;
  mask: url(/icons/component-forecast.svg) no-repeat center;
  -webkit-mask-size: contain;
}

.main-content {
  display: grid;
  grid-template-columns: minmax(500px, 100%);
  justify-content: center;
  margin: 70px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .main-content {
    margin: 20px 0 0;
    grid-template-columns: 1fr;
  }
}
.main-content article {
  background-color: #EDF3EC;
  box-shadow: 0 6px 6px 3px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: 1fr;
  padding: 20px;
}
.main-content .base-content {
  background-color: #EDF3EC;
  box-shadow: 0 6px 6px 3px rgba(0, 0, 0, 0.25);
  padding: 20px;
}

.settings-sub-menu {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 300px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu {
    flex-direction: column;
    display: flex;
  }
}
.settings-sub-menu h3 {
  margin: 0 0 20px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu h3 {
    border-right: none;
    margin: 0 0 10px;
  }
}
.settings-sub-menu .menu-content {
  margin-left: 20px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu .menu-content {
    margin: 0;
  }
}
.settings-sub-menu .menu-content .component {
  margin-bottom: 20px;
}
.settings-sub-menu .menu-side-content {
  border-right: 1px solid rgba(27, 20, 36, 0.3137254902);
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu .menu-side-content {
    border-right: none;
  }
}
.settings-sub-menu .menu-side-content .component {
  margin-top: 20px;
}

.companies-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 150px;
  border-bottom: 1px solid rgba(27, 20, 36, 0.3137254902);
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .companies-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
  }
}
.companies-container h4 {
  margin: 0;
  align-self: center;
  overflow-wrap: break-word;
}
.companies-container .contacts-container {
  border-left: 1px solid rgba(27, 20, 36, 0.3137254902);
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  justify-content: space-between;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .companies-container .contacts-container {
    border: none;
  }
  .companies-container .contacts-container .component-group {
    flex-direction: column;
  }
  .companies-container .contacts-container .component-group .component {
    margin: 0 0 20px;
  }
}
.companies-container .contacts-container .badge {
  cursor: default;
}

.companies-header {
  display: flex;
  height: fit-content;
  column-gap: 50px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .companies-header {
    flex-direction: column;
  }
}

html, body {
  margin: 0;
  height: 100%;
  background: #C5D8D3 none;
}

.rz-g > div, .rz-datalist-data > li {
  background: none;
  border: none;
}

.rz-datalist-content > .rz-g > .rz-card {
  box-shadow: var(--rz-card-shadow);
  flex-grow: 0;
  word-break: break-all;
}

.rz-datalist-data {
  padding: 0;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .rz-datalist-data li {
    padding-left: 0;
    padding-right: 0;
  }
}

.rz-card {
  background-color: #EDF3EC;
}

.planning-group {
  display: inline-flex;
  align-content: center;
  align-items: center;
}
.planning-group .planning-date-label {
  margin-right: 20px;
}
.planning-group .component {
  margin-left: 20px;
}

.container::before {
  width: 0;
  background-color: var(--container-color);
  content: "";
  display: inline-block;
  height: 46px;
  position: absolute;
  padding: 10px;
  margin-top: -10px;
  margin-left: -10px;
  border-top-left-radius: var(--rz-card-border-radius);
  border-bottom-left-radius: var(--rz-card-border-radius);
  box-sizing: content-box;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .container::before {
    border-bottom-left-radius: 0;
  }
}

.rz-datepicker.rz-popup {
  width: 440px !important;
}

/** PLANNING & CALENDAR CSS **/
/* Topbar is already sticky; keep */
.planning-topbar {
  position: sticky;
  top: 0;
  background: #EDF3EC;
  z-index: 10;
}

/* Header row aligned with body */
.planning-header-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(27, 20, 36, 0.3137254902);
  padding-block: 15px;
  background: #EDF3EC;
  z-index: 10;
}

/* Hour gutter spacer in header */
.spacer {
  flex: 0 0 var(--gutter);
}

/* Matches hour gutter width */
.calendar-shell {
  flex: 1 1 auto;
  min-width: 0;
}

/* Remove the 20px article padding for this page */
.planning--fullbleed .planning-width {
  width: 100%;
  max-width: none; /* remove calc(7 * var(--col-max)) cap */
  margin-inline: 0; /* no centering gaps */
}

.planning--fullbleed .planning-background {
  margin: 0;
}

/* Just in case */
.planning--fullbleed .calendar-grid {
  width: 100%;
}

/* Shared width wrapper so header and grid match */
.planning-width {
  width: 100%;
  margin-inline: auto;
}

/* Days header: 7 equal columns */
.planning-days,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

/* Body track: gutter + calendar */
.planning-track {
  display: flex;
}

/* Left gutter with hour labels */
.hour-gutter {
  height: 2400px;
  width: var(--gutter);
  display: flex;
  flex-direction: column;
  position: sticky;
  left: 0;
  z-index: 5;
  background: #EDF3EC;
}

.calendar-shell {
  flex: 1 1 auto;
  min-width: 0;
}

/* Hour ticks */
.planning-hour {
  height: 100px;
  width: var(--gutter);
  display: flex;
  align-content: center;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(27, 20, 36, 0.3137254902);
  border-right: 1px solid rgba(27, 20, 36, 0.3137254902);
}

/* Background hour lines span full calendar width */
.planning-background {
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 99px, rgba(27, 20, 36, 0.3137254902) 100px, rgba(27, 20, 36, 0.3137254902) 101px);
  background-size: 100% 100px;
}

/* Calendar grid itself fills the shared width */
.calendar-grid {
  height: 2400px;
  position: relative;
  width: 100%; /* critical: width cap now lives on .planning-width */
}

.calendar-day {
  position: relative;
  box-sizing: border-box;
  border-left: 1px solid rgba(27, 20, 36, 0.3137254902);
}

.calendar-day:first-child {
  border-left: 0;
}

/* Event cards */
.planning-row {
  background-color: var(--container-color);
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  cursor: pointer;
}
.planning-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive tweak: if viewport is narrow, prefer slightly smaller columns */
@media (max-width: 1200px) {
  :root {
    --col-max: 200px;
  }
}
/* Selected components bar at bottom */
.selected-components-container {
  position: sticky;
  bottom: 0;
  background: #EDF3EC;
  z-index: 100;
}

/** RIBBON STYLE CALENDAR ROW **/
/* Ribbon row sits under the weekday labels, inside the sticky topbar */
.planning-ribbon-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(27, 20, 36, 0.18);
  background: #EDF3EC;
  z-index: 10;
}

/* Ribbon grid: 7 equal columns, auto stack lanes (rows) as needed */
.vessel-ribbons {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 28px; /* lane height */
  gap: 4px 4px; /* row/col gap */
  padding: 6px 0 8px; /* vertical breathing room */
}

/* Individual ribbon pill */
.vessel-ribbon {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0; /* text ellipsis */
  border-radius: 6px;
  padding: 2px 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08) inset, 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  overflow: hidden;
  /* Continuation chevrons (if ribbon began before / ends after this week) */
}
.vessel-ribbon span {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.vessel-ribbon.continues-left::before, .vessel-ribbon.continues-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
  opacity: 0.35;
  pointer-events: none;
}
.vessel-ribbon.continues-left::before {
  left: 0;
  transform: scaleX(-1);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}
.vessel-ribbon.continues-right::after {
  right: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: #C5D8D3;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  width: 6px;
  background-color: #1B1424;
}

@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .mobile-hidden {
    display: none;
  }
}

.support-panel {
  position: fixed;
  bottom: 0;
  right: -15px;
  z-index: 1000;
  width: 20px;
  height: 100px;
}
.support-panel:has(.support-content) {
  width: 220px;
  height: 100px;
}
.support-panel span {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  transform: rotate(90deg);
  cursor: pointer;
  border-top: 1px solid #1B1424;
}
.support-panel .support-content {
  margin-left: 5px;
}

@media only screen and (max-width: 768px) {
  .mobile-full {
    width: 100% !important;
  }
}

:root {
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  color: #1B1424;
  background-color: #C5D8D3;
  --container-color: rgb(0,0,0);
  --active-focus: #EF9F0B;
  --gutter: 100px;
  --col-max: 240px;
  --col-min: 190px;
}

.input-text {
  border: none;
  border-bottom: 1px solid #1B1424;
  width: 200px;
  background-color: #EDF3EC;
  line-height: 20px;
  font-size: 20px;
  font-family: "Open Sans", sans-serif;
}
.input-text:focus {
  outline: none;
}

.component-icon {
  width: 20px;
  height: 20px;
  align-self: center;
  cursor: pointer;
}
.badge .component-icon {
  margin-left: 5px;
}
.button .component-icon {
  width: 15px;
  height: 15px;
  margin-left: 5px;
}

.component {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.component-display-name {
  align-self: center;
}

.badge {
  border-radius: 15px;
  font-size: 19px;
  padding: 5px 8px;
  background-color: #C5D8D3;
  margin-right: 20px;
  margin-bottom: 20px;
  display: inline-flex;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  line-height: 28px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 2px solid transparent;
  transition: all 0.3s;
}
.badge:hover {
  border: 2px solid rgba(27, 20, 36, 0.3137254902);
}
.badge:hover img {
  display: block;
}
.badge.active {
  background-color: #EF9F0B;
}
.badge img {
  display: none;
}
.badge a {
  color: #1B1424;
  text-decoration: none;
}

.button {
  border: 2px solid #3EDA4B;
  border-radius: 15px;
  background-color: #EDF3EC;
  color: #3EDA4B;
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  display: inline-flex;
  cursor: pointer;
  text-transform: uppercase;
}
.button:hover {
  box-shadow: 0 0 5px #3EDA4B;
}
.button.delete {
  border: 2px solid #DA4B3E;
  color: #DA4B3E;
}
.button.delete:hover {
  box-shadow: 0 0 5px #DA4B3E;
}

.component-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.component-group .component {
  margin-bottom: 20px;
  margin-right: 20px;
}

.component .select {
  position: relative;
  display: inline-block;
  z-index: 20;
}
.component .select-content {
  min-width: 100%;
  background-color: #C5D8D3;
  margin-top: 8px;
}
.component .select-content.closed {
  display: none;
}
.component .select-content.open {
  display: block;
  position: absolute;
}
.component .select-content span {
  list-style-type: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  height: 40px;
  padding-left: 5px;
  font-size: 15px;
}
.component .select-content span img {
  height: 20px;
  padding-right: 5px;
}
.component .select-content span:hover {
  background-color: #EDF3EC;
}
.component .select-content span:hover .checkbox {
  border-color: #C5D8D3;
}
.component .select-display {
  border: 3px solid #C5D8D3;
  padding: 5px 20px;
  cursor: pointer;
  text-transform: uppercase;
  user-select: none;
}

.rz-button-text {
  font-family: "Open Sans", sans-serif;
}

.file-input .file {
  opacity: 0;
  width: 0.1px;
  height: 0.1px;
  position: absolute;
}

.location-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #C5D8D3;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  overflow: auto;
}

.comment {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 4px;
  background-color: #C5D8D3;
  font-size: 14px;
  line-height: 20px;
  font-family: "Open Sans", sans-serif;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  user-select: none;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  transition: all 0.3s;
  min-width: 400px;
}
.comment.transporter {
  background-color: #EF9F0B;
}
.comment .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.comment .comment-header .comment-date {
  font-size: 12px;
  color: #1B1424;
}
.comment .comment-body {
  font-size: 14px;
  line-height: 20px;
  font-family: "Open Sans", sans-serif;
}

.component-forecast-page {
  display: block !important;
  --grid-template-columns: 1fr !important;
}

.forecast-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.forecast-toolbar .button {
  margin-right: 0;
}

.forecast-window-label {
  font-weight: 600;
  margin-left: auto;
}

/* Ekstra stramning på tablets / iPad */
@media (max-width: 1100px) {
  .forecast-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .forecast-window-label {
    margin-left: 0;
    margin-top: 5px;
  }
}
.forecast-subtitle {
  font-size: 0.9rem;
  color: #6c6c6c;
  margin-bottom: 15px;
}

.forecast-section {
  margin-top: 25px;
}

/* PC: 5 felter + knap på én række */
.forecast-addline-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}

/* Laptop / mindre skærme: 2 kolonner + knap på egen række */
@media (max-width: 1200px) {
  .forecast-addline-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .forecast-addline-row .forecast-line-actions {
    grid-column: 1/-1;
    text-align: right;
  }
}
/* iPad / endnu smallere: én kolonne – alt under hinanden */
@media (max-width: 1024px) {
  .forecast-addline-row {
    grid-template-columns: 1fr;
  }
  .forecast-addline-row .forecast-line-actions {
    grid-column: 1/-1;
    text-align: right;
    margin-top: 4px;
  }
}
.forecast-addline-row .component-display-name {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
}

.forecast-addline-row .input-text {
  width: 100%;
}

.forecast-table-wrapper {
  margin-top: 5px;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch; /* bedre scroll på iOS */
}

/* Search + pagination toolbar above each table */
.forecast-table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.forecast-table-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.forecast-table-controls-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.forecast-search-input {
  min-width: 180px;
  max-width: 260px;
}

.forecast-pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.forecast-pagination .button {
  padding: 2px 6px;
  font-size: 0.8rem;
}

.forecast-pagination .button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.forecast-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

/* lidt mindre tabel på iPad, så den ikke fylder unødigt */
@media (max-width: 1024px) {
  .forecast-table {
    font-size: 0.8rem;
  }
  .forecast-table input[type=number] {
    width: 50px;
  }
}
.forecast-table th,
.forecast-table td {
  padding: 4px 6px;
  border: 1px solid #d0d0d0;
}

/* Header må gerne bryde linje, så tabellen ikke tvinges alt for bred */
.forecast-table th {
  font-weight: 600;
  background-color: #f5f5f5;
  white-space: normal;
}

/* Men behold nowrap i selve cellerne */
.forecast-table td {
  white-space: nowrap;
}

.forecast-table td:nth-child(-n+5),
.forecast-table th:nth-child(-n+5) {
  text-align: left;
}

.forecast-table td:nth-child(n+6),
.forecast-table th:nth-child(n+6) {
  text-align: center;
}

.forecast-table input[type=number] {
  width: 60px;
  text-align: right;
}

.forecast-line-actions {
  white-space: nowrap;
}

.forecast-empty {
  font-style: italic;
  color: #777;
  padding: 4px 0 0 0;
}

/* Inline add-row inde i tabellen */
.forecast-add-row td {
  padding: 2px 4px; /* lidt strammere end de andre rækker */
}

.forecast-add-row .input-text {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
}

/* Kun for component-forecast siden */
.component-forecast-page .menu-content {
  margin-top: 0; /* fjern det ekstra hop ned efter toolbar */
}

/* Incoming/Outgoing skal ligge tættere på toolbar */
.component-forecast-page .forecast-section {
  margin-top: 12px; /* var 25px – strammere */
}

/* h4-overskrifter (Incoming/Outgoing) lidt tættere på ovenfor */
.component-forecast-page h4 {
  margin-top: 8px;
  margin-bottom: 6px;
}

/* Stram hele header-blokken op */
.component-forecast-page h3 {
  margin-top: 0;
  margin-bottom: 4px;
}

.component-forecast-page .forecast-subtitle {
  margin-top: 0;
  margin-bottom: 6px; /* var 15px */
}

.component-forecast-page .forecast-toolbar {
  margin-top: 0;
  margin-bottom: 6px;
}

/* Fjern default margin fra wrapper-div'en omkring header */
.component-forecast-page .forecast-header {
  margin: 0;
  padding: 0;
}

/* Header-blokken – fjern næsten al ekstra luft */
.forecast-header {
  margin: 0;
  padding: 0;
}

.forecast-header h3 {
  margin-top: 0;
  margin-bottom: 4px;
}

.forecast-header .forecast-subtitle {
  margin-top: 0;
  margin-bottom: 4px; /* var 15px */
}

.forecast-header .forecast-toolbar {
  margin-top: 0;
  margin-bottom: 4px;
}

/* Sektion (Incoming/Outgoing) må ikke lave stort hop ned */
.forecast-section {
  margin-top: 8px; /* var 25px hos dig */
}

/* Make the actions column sticky on the right inside the scroll wrapper */
.forecast-table-wrapper {
  position: relative; /* needed for sticky children */
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Actions column – just a bit wider so buttons fit nicely */
.forecast-actions-col {
  min-width: 130px;
  text-align: center;
}

/* Header cell needs to be on top of body cells when scrolling vertically */
.forecast-table thead .forecast-actions-col {
  z-index: 3;
}

/* Freeze first column */
.forecast-table th:first-child,
.forecast-table td:first-child {
  position: sticky;
  left: 0;
  background: #f9f9f9; /* neutral background */
  z-index: 3; /* above normal cells */
}

/* Freeze second column */
.forecast-table th:nth-child(2),
.forecast-table td:nth-child(2) {
  position: sticky;
  left: 160px; /* must match width of first column */
  background: #f9f9f9;
  z-index: 3;
}

.forecast-table th:nth-child(1),
.forecast-table td:nth-child(1) {
  width: 160px;
  min-width: 160px;
}

.forecast-table th:nth-child(2),
.forecast-table td:nth-child(2) {
  width: 160px;
  min-width: 160px;
}

/* ---- Truncated text in identity columns ---- */
.forecast-text-truncate {
  display: inline-block;
  max-width: 160px; /* tweak as you like */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* Slightly tighter on smaller screens */
@media (max-width: 1100px) {
  .forecast-text-truncate {
    max-width: 120px;
  }
}
/* ---- Simple modal for line details ---- */
.forecast-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 999;
}

.forecast-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 20px 24px;
  max-width: 480px;
  box-sizing: border-box;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 0.9rem;
}

.forecast-modal h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.forecast-modal dl {
  margin: 0 0 12px 0;
}

.forecast-modal dt {
  font-weight: 600;
  margin-top: 6px;
}

.forecast-modal dd {
  margin: 0;
}

.forecast-modal dd,
.forecast-modal li {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* keep details button a bit lighter if you want */
.forecast-details-button {
  background-color: transparent;
  border: 1px solid #aaa;
  color: #333;
}

/* Clickable property cells */
.forecast-cell-clickable {
  cursor: pointer;
  max-width: 180px; /* adjust as you like */
}

.forecast-cell-clickable:hover {
  background-color: #eef6ed; /* subtle highlight */
}

/* Truncated text inside the cell */
.forecast-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-button {
  background-color: #c62828 !important;
  color: white !important;
}

.delete-button:hover {
  background-color: #b71c1c !important;
}

/* Highlight entire row on hover */
.forecast-table tbody tr:hover {
  background-color: #dee5dd; /* subtle greenish tint */
}

/* Ensure sticky columns match hover color */
.forecast-table tbody tr:hover td:first-child,
.forecast-table tbody tr:hover td:nth-child(2) {
  background-color: #dee5dd;
}
