@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")};
    }
  }

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

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

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

.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;
}

:where(.q-field--standout.q-field--highlighted) {
  .q-field__native,
  .q-field__input,
  .q-field__prefix,
  .q-field__suffix {
    color: $color-text !important;
  }
}

.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;
  }
}

// Mobile safe area support — handled inline in MainLayout to avoid q-pa-sm !important conflict

// Prevent horizontal overflow in the Quasar scroll area internal container
.q-scrollarea__container {
  overflow-x: hidden !important;
}


.q-scrollarea__content {
  min-height: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
}

// All pages fill exactly the viewport width — never wider
.q-page > * {
  max-width: 100vw;
  box-sizing: border-box;
}

.notifications-grid {
  display: grid;
  width: 100%;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);

  @media (min-width: 600px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  @media (min-width: 1440px) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
