@use "sass:map";
@use "/src/css/quasar.variables.scss";

.flex-grow {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
}

.round {
  border-radius: 50%;
}

.self-center {
  align-self: center;
}

.input-disable {
  .q-field--outlined .q-field__control::before {
    border: 1px solid #b9b9b9 !important;
    transition: border-color 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.q-item__section--avatar {
  min-width: 0;
}

.q-toolbar {
  position: relative;
  padding: 0 12px;
  min-height: 50px;
  width: auto;
}

.q-drawer:has(.detached-container) {
  margin: 16px !important;
  margin-bottom: 16px !important;
  margin-left: 10px !important;
  border-radius: 8px !important;
  transition: all;
  color: #8b8b8b;
}

body.body--light {
  .q-drawer:has(.detached-container) {
    background: #{map.get($colors, "surface")} !important;
  }

  .q-menu {
    background: $neutral-light !important;
    color: $color-text !important;

    .q-item {
      color: $color-text;
    }

    .q-item--active,
    .q-item:hover {
      background: $violet-light !important;
      color: $violet-normal !important;
    }
  }

  .q-dialog {
    .q-card {
      background: #{map.get($colors, "surface-dark")};
    }
  }

  background: #{map.get($colors, "page")} !important;

  .q-list--dark,
  .q-item--dark:not(.q-item--active) {
    color: black;
  }

  .q-field--dark {
    .q-field__control:not(.text-negative) {
      .q-field__marginal {
        color: rgba(0, 0, 0, 0.54);
      }
      & ~ .q-field__bottom {
        color: rgba(0, 0, 0, 0.54);
      }
    }
    &:not(.q-field--highlighted)
      .q-field__control:not(.text-negative)
      .q-field__label {
      color: rgba(0, 0, 0, 0.54);
    }
  }

  .card-ring {
    box-shadow: 0 0 0 1px #c0c0c0c0 !important;
  }

  .menu-drawer {
    color: #8b8b8b;
  }
}

// body.body--dark {
//   background: #{map.get($colors-dark, "page")};

//   .q-drawer:has(.detached-container) {
//     background: #{map.get($colors-dark, "surface")} !important;
//   }

//   .q-menu {
//     background: #{map.get($colors-dark, "surface")};
//   }

//   .card-ring {
//     box-shadow: 0 0 0 1px #505050 !important;
//   }
// }

.q-card__actions .q-btn {
  padding: 10px 16px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

.q-separator {
  padding-top: 0px;
  padding-left: 0;
}

.q-scrollarea__content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto !important;
}

.remove-header-expansion-item {
  .q-list--dense > .q-item,
  .q-item--dense {
    display: none;
  }
}

.q-field__control {
  background: #fff !important;
}

.q-field--dark .q-field__native {
  color: black;
}

.q-field--dark .q-field__native,
.q-field--dark .q-field__prefix,
.q-field--dark .q-field__suffix,
.q-field--dark .q-field__input {
  color: black;
}

.q-field--dark:not(.q-field--highlighted) .q-field__label,
.q-field--dark .q-field__marginal,
.q-field--dark {
  color: black;
}

.q-field--standout.q-field--rounded .q-field__control {
  border-radius: 8px;
  box-shadow: 0 0 0 1px #c0c0c0c0;
}

.q-btn--rectangle {
  border-radius: 8px;
}

.q-table__select {
  .q-field__inner {
    .q-field__control {
      padding-left: 6px;
      border-radius: 8px;
      overflow: hidden;
    }
  }
}

.input-violet {
  .q-field__control {
    background: $violet-light !important;
    border-radius: 8px;
  }

  .q-field__native,
  .q-field__input {
    color: $violet-dark !important;
  }

  .q-field__label {
    color: $violet-normal !important;
  }

  .q-field--outlined .q-field__control:before {
    border-color: transparent !important;
  }

  .q-field--outlined .q-field__control:after {
    border-color: $violet-normal !important;
  }
}
