/* DT_control_style_SOFIN.css
 ****************************************************************************
 *   Project Name: SoFiN Digital Twin Engine                                *
 *   Institution: Friedrich-Alexander-University Erlangen-Nürnberg (FAU)    *
 ****************************************************************************
*/

:root {
  --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #dc3545;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
}

body {
    background-color: #fff;
    color: #212529;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

form {
    max-width: 800px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Two columns: label and input */
    gap: 10px;
    /* Space between rows and columns */
}

label {
    text-align: right;
    padding-right: 10px;
    align-self: center;
}

input,
.select {
    background: linear-gradient(to right, #0971b2, #0cb79d);
    color: white;
    border: 1px solid #0cb79d;
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    /* Rounded corners */
}
.select.background {
    background: #0971b2;
    color: black;
}


button {
    grid-column: span 2;
    /* Make the button span both columns */
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(to right, #0971b2, #0cb79d);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #6610f2;
}

.error {
    grid-column: span 2;
    color: red;
    font-size: 14px;
}


/* MAP */
/*---------------------------------------------------*/
#map {
    height: 500px;
    width: 90%;
    margin: 20px auto;
    border-radius: 15px;
    /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Optional: Add shadow for depth */
    border: 2px solid #0971b2;
}

/* Blur effect for non-selected elements */
.blur {
  filter: blur(1px);
  opacity: 0.4;
  transition: all 0.3s ease;
}

/* Blur the entire map background (tiles) */
.map-blurred .leaflet-tile-pane {
  filter: blur(5px);
  transition: filter 0.3s ease;
}

/* Slight zoom for the selected element */
.highlighted {
  transform: scale(1);
  transition: transform 0.3s ease;
  /* z-index: 10; /* keep it on top */
}

/* HEADER HTML STYLES */
/*---------------------------------------------------*/
#headerContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #212529;
}

#header a {
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

#homeButton {
    display: inline-block;
    padding: 10px 15px;
    background: linear-gradient(to right, #0971b2, #0cb79d);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}
#homeButton:hover {
    background-color: #0056b3;
}

#logoutButton {
    display: inline-block;
    padding: 10px 15px;
    background: linear-gradient(to right, #dc3545, #c82333); /* Red gradient for logout */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

#logoutButton:hover { background: #c82333; }

#topRightPictureContainer img {
    height: 40px;
}



#topRightPicture {
    display: inline-block;
    height: 60px;
    background-color: transparent; /* Light gray background */
    border-radius: 5px;
    object-fit: cover;
    vertical-align: middle;
}


/* Style for dropdown */
.dropdown {
    margin: 0px;
    padding: 10px;
    flex: 0;
    background: #0971b2; /* Blue background */
    color: white; /* White text */
    border: 1px solid #17a2b8; /* Cyan border */
    border-radius: 5px;
    cursor: pointer;
    min-width: 200px;
}

.dropdown.narrowline {
    background: linear-gradient(to right, #0971b2, #0cb79d);
    color: white; /* White text */
    width: 100%;
    padding: 8px;
    border-radius: 5px;
}

.dropdown option {
    background-color: #0971b2; /* Blue background */
    color: white; /* White text */
}

/* Style hovered option (works in Chrome/Edge) */
.dropdown option:hover,
.dropdown option:focus {
    background-color: #17a2b8; /* Cyan on hover */
    color: white;
}

.dropdown.green {
    /*border-color: #00d2a0; /* Green border */
}

.dropdown.yellow {
    /*  border-color: #00d2a0; /* Yellow border */
}

.dropdown.red {
    /*border-color: #00d2a0; /* Red border */
}

/* no clue what this does but fuck it */
* {
    box-sizing: border-box;
  }
  
/* Create two equal columns that floats next to each other */

.column.left{
  float: left;
  width: 45%;
  margin-left: 5%;
}
.column.right{
    float: right;
    width: 45%;
    margin-right: 5%;
  }
  
/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Shared styles for all ControlsDiv elements */
.controlsDiv {
    margin: 20px auto;
    background: linear-gradient(to right, #0971b2, #0cb79d);
    color: white; /* Slightly lighter than the background */
    /*padding: 15px;*/
    display: flex;
    width: 90%;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    /* Rounded corners for the controls container */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Subtle shadow for depth */
}

/* Shared styles for all buttons */
.controlsDiv button {
    margin: 5px;
    padding: 10px 20px;
    flex: 0;
    background: linear-gradient(to right, #0971b2, #0cb79d);
    /* Modern green */
    color: #ffffff;
    border: none;
    border-radius: 5px;
    /* Rounded corners for buttons */
    height: 70px; /* can i change that so it is as big as the biggest button? */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Specific styles for buttons with different colors */
.controlsDiv button.green {
    background-color: transparent;
}

.controlsDiv button.green:hover {
    background-color: #0056b3;
}

.controlsDiv button.yellow {
    background-color: transparent;
    color: #212529;
}

.controlsDiv button.yellow:hover {
    background-color: #0056b3;
}

.controlsDiv button.red {
    background-color: transparent;
}

.controlsDiv button.red:hover {
    background-color: #0056b3;
}

.controlsDiv button.blue {
    background-color: transparent;
}

.controlsDiv button.blue:hover {
    background-color: #0056b3;
}

/* SPINNER */

.spinner {
    margin: 20px auto;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    display: block;
}
@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}


/* PROGRESS BAR */
.progress-bar {
  width: 80%;
  margin: 0 auto 20px auto;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-bar .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ff00, #00cc00);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Add a striped animation for the download phase */
@keyframes barberpole {
    from { background-position: 0 0; }
    to   { background-position: 50px 50px; }
}

.progress-bar.downloading .bar {
    width: 100% !important;
    background-image: linear-gradient(
        45deg, 
        rgba(255, 255, 255, .15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, .15) 50%, 
        rgba(255, 255, 255, .15) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 50px 50px;
    animation: barberpole 1s linear infinite;
    background-color: #28a745; /* Green */
}

button:disabled {
    background-color: grey;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

/* STYLES FOR THE PLOTTING AREA */
.plotly-chart {
  width: 100%;
  height: 100%;
}

/* OFDR SANDBOX STYLES */
/*---------------------------------------------------*/
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 100vh;
  padding: 10px;
  box-sizing: border-box;
}

.cell {
  border: 1px solid #0971b2;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
}

.cell-title {
  background: linear-gradient(to right, #0971b2, #0cb79d);
  color: white;
  padding: 8px;
  font-weight: bold;
  text-align: center;
}

.cell-content {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}

/* Controls section */
.controls-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.point-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.point-row input {
  width: 100px;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid #0cb79d;
  background-color: #fff;
  color: #212529;
}

.btn {
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px 5px 0 0;
}

.btn-add {
  background-color: #2196F3;
  color: white;
}

.btn-remove {
  background-color: #f44336;
  color: white;
}

.btn-generate {
  background-color: #28a745;
  color: white;
}

/* Fixed buttons bottom-right of controls cell */
.control-buttons {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cell-content.controls {
  position: relative;
}

.right-align {
  text-align: right;
}

/* Dataset list styling */
.dataset-list {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid #0cb79d;
}

.dataset-list h4 {
  color: #0971b2;
  margin-bottom: 10px;
}

.dataset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin-bottom: 5px;
}

.dataset-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #6c757d;
}

.dataset-name {
  flex: 1;
  color: #212529;
  font-size: 14px;
}

.btn-toggle {
  background-color: #ffc107;
  color: #212529;
  padding: 4px 8px;
  font-size: 12px;
}

.btn-toggle.disabled {
  background-color: #6c757d;
  color: white;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
}

/* Boat Cluster Style */
.boat-cluster-icon {
    /* No background-color here! It is set by JS. */
    border: 2px solid #fff;
    border-radius: 15px;
    font-weight: bold;
    text-align: center;
    line-height: 26px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Weather Cluster Style */
.weather-cluster-icon {
    /* No background-color here! It is set by JS. */
    border: 2px solid #fff;
    border-radius: 15px;
    font-weight: bold;
    text-align: center;
    line-height: 26px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);