/*
 * CloudBeaver - Cloud Database Manager
 * Copyright (C) 2020-2024 DBeaver Corp and others
 *
 * Licensed under the Apache License, Version 2.0.
 * you may not use this file except in compliance with the License.
 */
.field.inline {
  display: flex;
  align-items: center;

  & .fieldLabel {
    padding-right: 8px;
    padding-bottom: 0;
    width: max-content;
  }
}

.field .input {
  margin: 0;
}

.fieldLabel {
  display: block;
  padding-bottom: 10px;
  composes: theme-typography--body1 from global;
  font-weight: 500;
}

.input {
  padding-right: 24px !important;
}

.input {
  font-size: 12px;

  &.select {
    cursor: pointer;
    user-select: none;
  }
}

.menuButton {
  position: absolute;
  right: 0;
  background: transparent;
  outline: none;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px 0 0;
  cursor: pointer;
  &:hover,
  &:focus {
    opacity: 0.7;
  }
}

.menuItem {
  composes: theme-ripple from global;
}

.menu {
  composes: theme-text-on-surface theme-background-surface theme-typography--caption theme-elevation-z3 from global;
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow: auto;
  outline: none;
  z-index: 999;
  border-radius: var(--theme-form-element-radius);

  & .menuItem {
    background: transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    text-align: left;
    outline: none;
    color: inherit;
    cursor: pointer;
    gap: 8px;

    & .itemIcon,
    & .itemTitle {
      position: relative;
    }

    & .itemIcon {
      width: 16px;
      height: 16px;
      overflow: hidden;
      flex-shrink: 0;

      & .iconOrImage {
        width: 100%;
        height: 100%;
      }
    }
  }
}

.icon {
  height: 16px;
  display: block;
}

.menuButton .icon.focus {
  transform: rotate(180deg);
}
.inputBox {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;

  & .inputIcon {
    position: absolute;
    left: 0;
    width: 16px;
    height: 16px;
    margin-left: 12px;

    & .iconOrImage {
      width: 100%;
      height: 100%;
    }

    &:not(:empty) + .input {
      padding-left: 34px !important;
    }
  }
}

.validationInput {
  z-index: -1;
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
}
