/*  ----------------------------------
        Farbvariablen
    ---------------------------------- */

:root {
    --dark-blue: #253241;
    --light-gray: #555555;
    --dark-gray: #333333;
    --dark-red: #A72A28;
    --green: #046307;
    --green-trans: #04630780;
    --yellow: #F4C430;
    --orange: #E67E22;

    /* Hintergrundfarben */
    --background-main: #1F2937;
    --background-secondary: #171f2a;

    /* Button Farben */
    --btn-blau-background: rgb(13, 144, 161);
    --btn-blau-hover: rgb(16, 164, 184);
    --btn-blau-active: rgb(16, 164, 184);
    --btn-blau-border: #4B5563;

    --btn-rotorange-background: rgb(199, 87, 11);
    --btn-rotorange-hover: rgb(224, 102, 17);
    --btn-rotorange-active: rgb(224, 102, 17);
    --btn-rotorange-border: #9C4221;

    --btn-blaulila-background: rgb(64, 81, 181);
    --btn-blaulila-hover: rgb(79, 99, 204);
    --btn-blaulila-active: rgb(79, 99, 204);
    --btn-blaulila-border: #374151;

    --btn-gruenbraun-background: rgb(34, 139, 34);
    --btn-gruenbraun-hover: rgb(40, 158, 40);
    --btn-gruenbraun-active: rgb(40, 158, 40);
    --btn-gruenbraun-border: #556B2F;
    

    /* Eingabefelder und Auswahlfelder */
    --input-background: #2D3748;
    --input-hover-active: rgb(16, 164, 184);
    --input-border: #4B5563;

    /* Textfarben */
    --text-light: #FFFFFF;
    --text-dark: #E2E8F0;

    /* Benachrichtigungen */
    --notification-success-bg: #2F855A;
    --notification-success-text: #FFFFFF;
    --notification-warning-bg: #D97706;
    --notification-warning-text: #FFFFFF;
    --notification-error-bg: #9B2C2C;
    --notification-error-text: #FFFFFF;
    --notification-info-bg: #3182CE;
    --notification-info-text: #FFFFFF;

    /* Reanimation */
    --rea-bg: #e09200;
    --rea-hover: #ffa600;

    --col_status1: #64aa32;
    --col_status2: #148c14;
    --col_status3: #14558c;
    --col_status4: #8c2814;
    --col_status6: #646464;
    --col_status7: #1e148c;
    --col_status8: #5a148c;
    --col_status9: #828214;
    --col_statusA: #253241;

    --content-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    --borderradius: .75vh;
}

/*  ----------------------------------
        Scrollbar
    ---------------------------------- */

  /* Firefox */
  * {
    scrollbar-width: 5px;
    scrollbar-color: #0d90a1 #253241;
  }

  /* Chrome, Edge, and Safari */
  *::-webkit-scrollbar {
    width: 5px;
  }

  *::-webkit-scrollbar-track {
    background: #253241;
    width: 6px;
  }

  *::-webkit-scrollbar-thumb {
    background-color: #0d90a1;
    border-radius: 10px;
    border: 3px none #ffffff;
  }


/*  ----------------------------------
        Grundstruktur
    ---------------------------------- */

body, html {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--dark-gray);
    font-family: sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    box-sizing: border-box;
}

#app-container {
    position: relative;
    width: 90%;
    background-color: var(--background-secondary);
    box-shadow: 10px 10px 30px 0px rgba(0,0,0,0.75);
    display: grid;
    grid-template-rows: 7.5% 1fr 5%;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: var(--borderradius);
}

.img-baustelle {
    display: inline;
    align-self: center;
    justify-self: center;
    height: 100%;
    width: 100%;
}

.img-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.8;
}

.disabled {
    pointer-events: none;
    opacity: 0.5;
}


#notification-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
}

.notification {
  background: #333;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  min-width: 300px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease-out;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/*  ----------------------------------
        Titlebar
    ---------------------------------- */

#titlebar {
    grid-row: 1/2;
    width: 100%;
    background-color: var(--background-secondary);
    position: relative;
    display: flex;
    flex-direction: row;
    gap: .5%;
    align-items: center;
    padding-left: 1%;
    box-sizing: border-box;
}

#titlebar-logo {
    position: absolute;
    height: 70%;
    right: 2%;
    top: 50%;
    transform: translateY(-50%);
}

.menu {
  display: flex;
  gap: .5vh;
}

.menu-item {
  position: relative;
}

.menu-title {
  padding: 10px 15px;
  background: var(--dark-gray);
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.menu-title:hover {
  background: var(--light-gray);
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark-gray);
  border: 1px solid #444;
  min-width: 200px;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.submenu-item {
  padding: 10px 15px;
  color: white;
  cursor: pointer;
  white-space: nowrap;
}

.submenu-item:hover {
  background: var(--light-gray);
}

.submenu-item.has-sub {
  position: relative;
  background-color: var(--dark-gray); /* etwas heller für erweiterbare Punkte */
}

.submenu-level-3,
.submenu-level-4 {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: var(--dark-gray);
  border: 1px solid #444;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 11;
}

/* Sichtbare Menüs durch Klasse */
.submenu.open,
.submenu-level-3.open,
.submenu-level-4.open {
  display: block;
}

.disabled-menu {
    display: none;
}



/*  ----------------------------------
        SNA App
    ---------------------------------- */

#sna-app {
    grid-row: 2/3;
    background-color: var(--background-secondary);
    position: relative;
}

.sna-page {
    position: absolute;
    display: none;
    height: 100%;
    width: 100%;
    grid-template-columns: repeat(14, 1fr);
    grid-template-rows: repeat(14, 1fr);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: .5vh;
    gap: 1vh;
    display: none;
    box-sizing: border-box;
    box-shadow: inset 0px 0px 15px 0px rgba(0,0,0,0.75);
}

.sna-menu-btn {
    position: relative;
    display: block;
    height: 70%;
    aspect-ratio: 2/1;
    background-color: var(--dark-blue);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}
.sna-menu-btn:hover {
    background-color: var(--light-gray);
}
.sna-menu-btn > img {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform: translateY(0);
}

.sna_additionalinfoandquest {
    background-color: var(--dark-blue);
    border: solid var(--light-gray);
    color: white;
    border-radius: var(--borderradius);
}


/*  ----------------------------------
        Footbar
    ---------------------------------- */

#footbar {
    position: relative;
    grid-row: 3/4;
    font-size: .75em;
    font-weight: normal;
    display: flex;
    align-items: center;
    padding: 1em;
    justify-content: space-around;
    background-color: var(--background-secondary);
}

/*  ----------------------------------
        Modal
    ---------------------------------- */

#modal-container {
    background-color: #00000080;
    z-index: 50;
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 95%;
    box-sizing: border-box;
}

.modal {
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    height: 98%;
    width: 98%;
    grid-template-rows: 5% 95%;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: var(--borderradius);
}

.modal-title {
    position: relative;
    grid-row: 1/2;
    background-color: var(--light-gray);
}
.modal-title-text {
    position: absolute;
    left: 1%;
    height: 100%;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.25em;
}
.modal-close-btn {
    position: absolute;
    right: .5em;
    top: 50%;
    transform: translateY(-50%);
    height: 2em;
    width: 2em;
    background-color: var(--btn-rotorange-background);
    border-radius: var(--borderradius);
    z-index: 50;
}
.modal-close-btn:hover {
    background-color: var(--btn-rotorange-hover);
}
.modal-close-btn > img {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-inlet {
    grid-row: 2/3;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    padding: .75em;
    gap: .75em;
    box-sizing: border-box;
    background-color: var(--background-secondary);
}

#modal_welcome_logo {
    grid-row: 6/9;
    grid-column: 9/13;
    width: 100%;
    align-self: center;
}

#map {
    display: block;
    grid-row: 1/13;
    grid-column: 1/10;
    border-radius: var(--borderradius);
}

#leitstelleInfo {
    grid-row: 2/6;
    grid-column: 10/13;
}

#map_infoPanel {
    grid-row: 8/13;
    grid-column: 10/13;
}


/*  ----------------------------------
        Calloverview
    ---------------------------------- */

#calloverview_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2vh;
    overflow-y: auto;
}

.call {
    position: relative;
    display: block;
    width: 100%;
    min-height: 7.5vh;
    background-color: var(--dark-gray);
    color: #fff;
    margin-bottom: 2vh;
    border-radius: var(--borderradius);
}

.call > .open-btn {
    position: absolute;
    top: .5vh;
    right: .5vh;
}

.call_callnumber {
    position: absolute;
    top: .5vh;
    left: .5vh;
}

/*  ----------------------------------
        Einsatzstrucktur
    ---------------------------------- */
#sna_units_ea {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2vh;
    overflow-y: auto;
}

.ea {
    position: relative;
    display: block;
    width: 100%;
    min-height: 7.5vh;
    background-color: var(--dark-gray);
    color: #fff;
    margin-bottom: 2vh;
    border-radius: var(--borderradius);
}

/*  ----------------------------------
        Pages
    ---------------------------------- */

.page-title {
    position: relative;
    height: 100%;
    width: 100%;
    grid-row: 1/2;
    grid-column: 1/3;
}
.page-title-background {
    position: absolute;
    height: 100%;
}
.page-title-text {
    position: absolute;
    display: flex;
    align-items: center;
    right: .25em;
    height: 100%;
    z-index: 1;
    font-size: 1.25em;
    font-weight: bold;
}

.inlet-btn {
    position: absolute;
    display: flex;
    height: 100%;
    width: 100%;
    background-color: var(--dark-gray);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}
.inlet-btn:hover {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}
.inlet-btn > img {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform: translateY(0);
}

/*  ----------------------------------
        Items
    ---------------------------------- */

button {
    background-color: var(--btn-blau-background);
    border: none;
    color: var(--text-light);
    padding-right: .5em;
    box-sizing: border-box;
    font-size: .85em;
    cursor: pointer;
    position: relative;
    border-radius: var(--borderradius);
    text-align: right;
}
button:hover {
    background-color: var(--btn-blau-hover);
}

.btn-img {
    position: absolute;
    left: .2em;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
}

button > img {
    position: absolute;
    left: .2em;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
}

button > .largebtnimg {
    position: absolute;
    height: 100%;
    width: 100%;
}

.server-btn {
    display: block;
}

/* Button Colours */

.gray-btn {
    background-color: #666666;
    color: var(--text-light);
}
.gray-btn:hover {
    background-color: #444444;
}

.green-btn {
    background-color: green;
    color: var(--text-light);
}
.green-btn:hover {
    background-color: rgb(1, 160, 1);
}

.rea-btn {
    background-color: var(--rea-bg);
    color: var(--text-light);
}
.rea-btn:hover {
    background-color: var(--rea-hover);
}

select, input, .input {
    width: 100%;
    height: 100%;
    border: solid 0.05em var(--input-border);
    background-color: var(--input-background);
    color: var(--text-light);
    border-radius: var(--borderradius);
    align-self: center;
    font-size: 1em;
    text-align: left;
    box-sizing: border-box;
    padding-left: 1%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    position: relative;
}

  .input-with-label {
    position: relative; /* Referenz für das Label */
    width: 100%;
    height: 100%;
  }

  .input-with-label input,
  .input-with-label select,
  .input-with-label textarea {
    width: 100%;
    border: solid 0.05em var(--input-border);
    background-color: var(--input-background);
    color: var(--text-light);
    border-radius: var(--borderradius);
    font-size: 1em;
    text-align: left;
    box-sizing: border-box;
    padding-left: 1%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  }

  .input-with-label textarea {
    padding-top: 1.5vh;
    resize: none;
  }


  .floating-label {
    position: absolute;
    top: -0.6em;    /* etwas oberhalb vom Feld */
    left: 0.8em;
    background: var(--dark-gray);
    color: #fff;
    padding: 0.1em 0.5em;
    border-radius: 0.4em;
    font-size: 0.8rem;
    pointer-events: none;
    min-width: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    border: solid 0.05em var(--input-border);
  }

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    transition: border-color 0.3s ease, box-shadow 0.3s ease;

    cursor: pointer;
}

input:focus {
    outline: none;
    border: 2px solid var(--orange);
    box-shadow: 0 0 5px var(--orange); /* Optional: Leuchtender Effekt */
    border-radius: var(--borderradius);
}

select:hover, input:hover, textarea:hover, option:hover {
    background-color: var(--input-hover-active);
}

textarea {
    width: 100%;
    height: 100%;
    border-radius: var(--borderradius);
    align-self: center;
    font-family: sans-serif;
    font-size: 1em;
    border: solid 0.05em var(--input-border);
    background-color: var(--input-background);
    color: var(--text-light);
    box-sizing: border-box;
    padding-left: 1%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

textarea:focus {
    outline: none;
    border: 2px solid var(--orange);
    box-shadow: 0 0 5px var(--orange);
    background-color: var(--input-hover-active);
    border-radius: var(--borderradius);
}

.question {
    position: relative;
    background-color: var(--light-gray);
    color: #fff;
    border-radius: var(--borderradius);
}
.question > p {
    position: absolute;
    max-width: 85%;
    right: .5em;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
    text-align: right;
}
.question > img {
    position: absolute;
    left: .2em;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
}

.actionrequired {
    position: relative;
    background-color: var(--dark-red);
    color: white;
    border-radius: var(--borderradius);
}
.actionrequired > p {
    position: absolute;
    max-width: 85%;
    right: .5em;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
    text-align: right;
}
.actionrequired > img {
    position: absolute;
    left: .2em;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
}

.infotitle {
    position: relative;
    background-color: var(--dark-gray);
    color: white;
    border-radius: var(--borderradius);
}
.infotitle > p {
    position: absolute;
    max-width: 85%;
    right: .5em;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
    text-align: right;
    font-size: 1em;
}
.infotitle > img {
    position: absolute;
    left: .2em;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
}

.itemcontainer {
    background-color: var(--background-secondary);
    border: solid .2em var(--light-gray);
    border-radius: var(--borderradius);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.itemcontainer-title {
    position: relative;
    grid-row: 1/2;
    grid-column: 1/3;
    background-color: var(--light-gray);
}
.itemcontainer-title-text {
    position: absolute;
    left: 1%;
    height: 100%;
    display: flex;
    align-items: center;
    color: black;
    font-size: 1.25em;
}

.blankdiv {
    background-color: var(--dark-gray);
    border-radius: var(--borderradius);
}

/* Rufgruppen */

