@import "variables";
@import "mixins";

// ----- HEADER SECTION RELATED STYLES ----- //
.cageeye-header-logo {
    display: flex;
    align-items: center;
    margin-right: 20px;

    .cageeye-logo {
        margin-right: 20px; // Adjust space to the right of the logo
    }

    .cageeye-title {
        display: flex;
        flex-direction: column;
        justify-content: space-between; // Space between titles
        min-width: 200px;
        color: $heading-font-color;

        .cageeye-title-big {
            font-size: 24px; // Adjust size if necessary
            margin-bottom: 8px; // Adjust vertical space between titles if necessary
        }

        .cageeye-title-small {
            font-size: 16px; // Adjust size if necessary
        }
    }
}

$header-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
    0 0 0 3px rgba(0, 126, 255, 0.1);

.header-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: 80px;
    position: -webkit-sticky; // Safari
    position: sticky;
    top: 0;
    padding: 0px 10px;
    background: $background-secondary;
    border-bottom: 1px solid $border-color;
    z-index: 999;

    .cageeye-header-options {
        justify-self: center;
    }

    .cageeye-logo,
    .profile-img {
        height: 48px;
        margin-right: 20px;
        border-radius: 50%;
    }
    .cageeye-header__user {
        margin-right: 0;
        margin-left: auto;
    }
}

.cageeye-header-options-container {
    display: flex;
    height: 100%;
}

.date-picker-container {
    margin: 0 2px;
    padding: 23px 0;
    
    .mantine-DatePickerInput-input {
        min-width: 300px;
        text-align: center;
        border-color: $border-color;
        background-color: transparent;
        color: $heading-font-color;
        font-weight: 400;
        font-size: 16px;
        padding: 0 10px;

        &::placeholder,
        i {
            color: $placeholder-color !important;
        }
    }
}

.mantine-DatePickerInput-weekNumber {
  font-weight: 700;
  background-color: var(--mantine-color-gray-0);
  border-right: 1px solid var(--mantine-color-gray-2);
}

.farm-cages-selection-container {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 15px;
    height: 80px;
}

.dropdown {
    position: relative;
    margin: 0 2px;
    padding: 23px 0;
    cursor: pointer !important;

    .mantine-Button-label {
        font-size: 16px;
        font-weight: 400;
    }

    #meals-options-container, #cages-options-container {
        display: none;
        position: absolute;
        min-width: 150px;
        background-color: $background-secondary;
        border: 1px solid $border-color;
        box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
        z-index: 10;
        padding: 10px;
        border-radius: 5px;
        margin-top: 8px; 

        .button-multiselect-base {
            margin: 5px 0;
            display: block;

            &.button-multiselect-selected, &.button-multiselect-primary, &.button-multiselect-secondary {
                margin-bottom: 5px;
            }
        }
    }

    .dropdown-multiselect-button {
        min-width: 150px;
        white-space: nowrap;
        background-color: $background-secondary;
        color: $heading-font-color;
        border: 1px solid $border-color;
    }

    &:focus #meals-options-container,
    &:hover #meals-options-container,
    &:hover #cages-options-container,
    &:focus #cages-options-container {
        display: block;
    }
}

.farms-dropdown-container {
    width: 220px;

    .mantine-Select-input{
        background-color: $background-secondary;
        color: $heading-font-color;
        border-color: $border-color;
        font-weight: 400;
        font-size: 16px;
    }    
    .mantine-Select-dropdown {
        background-color: $background-secondary;
        border-color: $border-color;
    }
    .mantine-Select-option {
        color: $heading-font-color;
        font-size: 16px;
        &:hover {
            background-color: darken($blue4, 10%); // Slight darkening on hover
            color: white; 
        }
    }

    .mantine-Select-groupLabel {
        color: #7F99AA;
        &::after{
            background-color: #7F99AA;
        }            
    }
}

/* Styles the floating dropdown panel container */


.cages-sidebar {
    background-color: $background-secondary;
    width: 100%;
}

#cages-checklist-content label input[type="checkbox"] {
    margin: 5px 10px 0px 10px;
}

#meals-checklist-content label input[type="checkbox"] {
    margin: 5px 10px 0px 10px;
}

.units-paragraph {
    padding: 15px 20px;
    text-align: justify;
    border: 2px solid lighten($background-primary, 10%);
    border-radius: 8px;
    background-color: rgba($background-primary, 0.6);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;

    text-transform: none;
    font-weight: 400;
    letter-spacing: 0.5px;
}


.units-paragraph {
    padding: 15px 20px;
    text-align: justify;
    border: 2px solid lighten($background-primary, 10%);
    border-radius: 8px;
    background-color: rgba($background-primary, 0.6);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;

    text-transform: none;
    font-weight: 400;
    letter-spacing: 0.5px;
}




.button-pair-multiselect-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.button-multiselect-base {
  width: 100%;
  font-size: 18px;
  line-height: 1.5;
  cursor: pointer;
  margin: 0.125rem;
  text-align: center;
  border: 1px solid transparent;
  color: $heading-font-color;
  background-color: transparent;
  transition: background-color 0.4s ease, color 0.4s ease;

  &.button-multiselect-primary {
    background-color: transparent; // No background by default
    &:hover {
      background-color: darken($blue4, 10%); // Slight darkening on hover
      color: white;
    }
  }

  &.button-multiselect-secondary {
    padding: 0;
    width: 30px;
    background-color: transparent; // No background by default
    &:hover {
      background-color: darken($blue4, 10%); // Slight darkening on hover
      color: white;
    }
  }

  &.button-multiselect-selected {
    background-color: $sidebar-font-color-active;
    color: white;
    &:hover {
      background-color: darken($blue4, 10%); // Slight darkening on hover     
    }    
  }
}

.selectAll-multiselect-btn {
  color: $heading-font-color;
  border-color: $heading-font-color;
  font-size: 18px;
  width: 100%;
  margin-bottom: 5px;
  &:hover {
    background-color: $sidebar-font-color-active;
    color: white;
  }
}


@keyframes slideInOut {
    0%, 100% { transform: translateY(-50%) rotate(-90deg) translateX(10px); }
    50% { transform: translateY(-50%) rotate(-90deg) translateX(0); }
}

.development-banner {
    position: absolute;
    right: -25vh;
    top: 50vh;
    z-index: 1000;
    background-color: $orange6;
    color: black;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 14px;
    font-family: 'Press Start 2P', cursive;
    font-weight: bold;
    cursor: pointer;
    animation: slideInOut 3s infinite ease-in-out;
    text-orientation: mixed;
    max-height: 60px;
    max-width: 80vh;
    text-align: center;
}

.lang-radio {

    margin-bottom: 1rem;

    .mantine-Radio-body {
        padding: 7px 10px;
        text-align: justify;
        border: 2px solid lighten($background-primary, 10%);
        border-radius: 8px;
        background-color: rgba($background-primary, 0.6);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        margin-left: auto;
        margin-right: auto;
        display: flex;
        align-items: center;
        justify-content: center;

        text-transform: none;
        font-weight: 400;
        letter-spacing: 0.5px;
        display: flex;
        border: 2px solid lighten($background-primary, 10%);
        justify-content: space-between;
        margin: 0.4rem;
        background-color: rgba($background-primary, 0.6) 
    }

    .mantine-Radio-root[data-checked="true"] .mantine-Radio-label {
         font-weight: bold;
    }
}

.maintenance-section {
    width: 100%;
    min-height: 30px;
    position: -webkit-sticky; // Safari
    position: sticky;
    bottom: 0px;
    padding: 0px 10px;
    background: $orange6;
    color: black;
    border-bottom: 1px solid $border-color;
    z-index: 999;    
    margin: auto;

    .maintenance-text{
        color: black;
        text-transform: uppercase;
    }
}

// Sentry

//opacity on feedback button
#sentry-feedback {
    opacity: 0.6;
    &:hover{
        opacity: 1;
    }
  }

//move dash debug menu a little higher to make room for sentry button
.dash-debug-menu {
    bottom: 85px !important;
}
.dash-debug-menu__outer{
    &--closed{
        bottom: 85px !important;
    }
    &--open{
        bottom: 78px !important;
    }
}
