/**
 * Copyright Aquera Inc 2023
 *
 * This source code is licensed under the BSD-3-Clause license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { css } from 'lit';
/**
 * Input CSS
 */
export const styles = css `
  :host {
    display: block;
    --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);
    --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);
    --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;
    --ng-box-shadow-1: 0px 1px 2px 0px var(--ng-colors-effects-shadow-xs);
    -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
    -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
    text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
  }


  /* To Hide Safari's AutoFill icon */
  input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    width: 0;
    margin: var(--nile-spacing-none);
    padding: var(--nile-spacing-none);
  }

  /* To Hide Safari's AutoFill icon */
  input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    width: 0;
    margin: 0;
    padding: 0;
  }

  /* To Hide Safari's AutoFill icon */
  input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    width: 0;
    margin: 0;
    padding: 0;
  }

  .form-control .form-control__label {
    display: none;
  }

  .form-control .form-control__help-text {
    display: none;
  }

  /* Label */
  .form-control--has-label .form-control__label {
    display: inline-block;
    color: inherit;
    margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));
    color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));
    font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
    font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
    font-style: normal;
    font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
    line-height: var(--nile-type-scale-6, var(--ng-line-height-text-sm));
    letter-spacing: 0.2px;
  }

  .form-control--has-label.form-control--medium .form-control__label {
    font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
  }
  :host([disabled]) .form-control--has-label .form-control__label {
    user-select: none;
    -webkit-user-select: none;
  }

  :host([required]) .form-control--has-label .form-control__label::after {
    content: '*';
    margin-inline-start: -2px;
    color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));
  }

  /* Help text */
  .form-control--has-help-text .form-control__help-text {
    display: block;
    color: var(--nile-colors-dark-500);
    margin-top: var(--nile-spacing-sm);
  }

  /* Error message */
  .form-control__error-message {
    display: block;
    color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));
    margin-top: var(--nile-spacing-lg, var(--ng-spacing-sm));
    font-size: var(--nile-type-scale-2);
    font-style: normal;
    line-height: var( --nile-form-error-text-line-height,  var(--ng-line-height-text-sm));
    letter-spacing: 0.2px;
  }

  .form-control--has-help-text.form-control--medium .form-control__help-text {
    font-size: var(--nile-type-scale-1);
  }

  .form-control--has-help-text.form-control--radio-group
    .form-control__help-text {
    margin-top: var(--nile-spacing-xxxsmall);
  }

  .input {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: stretch;
    justify-content: start;
    position: relative;
    width: 100%;
    font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
    vertical-align: middle;
    overflow: hidden;
    cursor: text;
    transition: 150ms color, 150ms border, 150ms box-shadow,
      150ms background-color, 150ms outline;
    box-sizing: border-box;
    color: var(--nile-colors-dark-900);
    font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
    font-size: var(--nile-type-scale-3);
    font-style: normal;
    line-height: 14px;
    letter-spacing: 0.2px;
  }


  /* Standard inputs */
  .input--standard {
    background-color: var(--nile-input-standard-background-color, var(--ng-colors-bg-primary));
    border: solid 1px var(--nile-input-standard-border-color, var(--ng-colors-border-primary));
    box-shadow: var(--nile-input-shadow-standard, var(--ng-shadow-xs));
    outline:var(--nile-outline-none, var(--ng-private-outline-transparent));
  }

  .input--standard:hover {
    border-color: var(--nile-colors-dark-900, var(--ng-colors-border-neutral));
  }

  .input--standard.input--error:hover:not(.input--disabled) {
    border-color: var(--nile-colors-dark-900, var(--ng-colors-border-error));
  }

  .input--standard.input--focused:not(.input--disabled) {
    background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
    border-color: var(--nile-colors-primary-500, var(--ng-colors-border-brand));
    box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));
  }
  .input--standard.input--focused:not(.input--disabled) {
  position: relative; 
  background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
  box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));
  border-color: var(--nile-colors-primary-500, var(--ng-colors-border-brand));
  /* border-width: var(--nile-border-width-1, var(--ng-border-width-2)); */
}

/* Added to apply the hover effect in nxtgen  */
.input--standard.input--focused:not(.input--disabled)::before {
  content: "";
  position: absolute;
  inset: 0;  
  pointer-events: none; 
  border-radius: 6.5px;
  box-shadow: inset 0 0 0 1px  var(--ng-colors-border-brand);
}

  .input--standard.input--focused.input--warning:not(.input--disabled) {
    background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
    border-color: var(--nile-colors-primary-500, var(--ng-colors-border-warning));
    box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));
    outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-warning));
  }

  .input--standard.input--focused.input--success:not(.input--disabled) {
    background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
    border-color: var(--nile-colors-primary-500, var(--ng-colors-border-success));
    box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));
    outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-success));
  }
  
  .input--standard.input--focused.input--error:not(.input--disabled) {
    background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
    border-color: var(--nile-colors-primary-500, var(--ng-colors-border-error));
    box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));
    outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-error));
  }

  .input--standard.input--focused:not(.input--disabled) .input__control {
    color: var(--nile-colors-primary-900);
  }

  .input--standard.input--disabled {
    background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
    border-color: var(--nile-colors-neutral-500,var(--ng-colors-border-disabled));
    /* opacity: 0.5; */
    cursor: not-allowed;
    user-select: none;
    -webkit-user-select: none;
  }

  .input--standard.input--disabled .input__control {
    color:  var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    
  }

  .input--standard.input--disabled .input__control::placeholder {
    color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
    background:var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
  }

  .input--standard.input--warning {
    border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning-subtle));
  }

  .input--standard.input--warning:hover {
    border-color: var(--nile-colors-dark-900, var(--ng-colors-border-warning));
  }

  .input--standard.input--error {
    border-color: var(--nile-colors-red-500, var(--ng-colors-border-error-subtle));
  }

  .input--standard.input--success {
    border-color: var(--nile-colors-green-500, var(--ng-colors-border-success-subtle));
  }

  .input--standard.input--success:hover {
    border-color: var(--nile-colors-dark-900, var(--ng-colors-border-success));
  }

  .input--standard.input--destructive {
    border-color: var(--nile-colors-red-400);
  }

  .input--standard.input--focused.input--destructive:not(.input--disabled) {
    border: 1px solid var(--nile-colors-red-400);
    box-shadow: var(--nile-input-shadow-destructive-active);
  }

  .input--destructive:active {
    border: 1px solid var(--nile-colors-red-400);
    box-shadow: var(--nile-input-shadow-destructive-active);
  }

  /* Filled inputs */
  .input--filled {
    border: none;
    background-color: var(--nile-colors-dark-100);
    color: hsl(240 5.3% 26.1%);
  }

  .input--filled:hover:not(.input--disabled) {
    background-color: var(--nile-colors-dark-100);
  }

  .input--filled.input--focused:not(.input--disabled) {
    background-color: var(--nile-colors-dark-100);
    outline: solid 3px hsl(200.4 98% 39.4%);
    outline-offset: 1px;
  }

  .input--filled.input--disabled {
    background-color: var(--nile-colors-dark-100);
    cursor: not-allowed;
  }

  .input__control {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: none;
    background: none;
    box-shadow: none;
    padding: var(--nile-spacing-none, var(--ng-spacing-md)) var(--nile-spacing-none, var(--ng-spacing-lg));
    margin: var(--nile-spacing-none, var(--ng-spacing-none));
    cursor: inherit;
    -webkit-appearance: none;
    color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
    font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
    font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));
    font-style: normal;
    font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
    line-height: var(--nile-type-scale-4, var(--ng-line-height-text-md));
    letter-spacing: 0.2px;
  }

  .input__control::-webkit-search-decoration,
  .input__control::-webkit-search-cancel-button,
  .input__control::-webkit-search-results-button,
  .input__control::-webkit-search-results-decoration {
    -webkit-appearance: none;
  }

  .input__control:-webkit-autofill {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;
    /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */
    caret-color: hsl(240 5.3% 26.1%);
  }

  .input__control:-webkit-autofill:hover {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;
    /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */
    caret-color: hsl(240 5.3% 26.1%);
  }

  .input__control:-webkit-autofill:focus {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;
    /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */
    caret-color: hsl(240 5.3% 26.1%);
  }

  .input__control:-webkit-autofill:active {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;
    /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */
    caret-color: hsl(240 5.3% 26.1%);
  }

  .input--filled .input__control:-webkit-autofill {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;
  }

  .input--filled .input__control:-webkit-autofill:hover {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;
  }

  .input--filled .input__control:-webkit-autofill:focus {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;
  }

  .input--filled .input__control:-webkit-autofill:active {
    box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;
  }

  .input__control::placeholder {
    color: var(--nile-colors-dark-500, var(--ng-colors-text-placeholder));
    user-select: none;
    font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
  }

  .input:hover:not(.input--disabled) .input__control {
    color: var(--nile-colors-dark-900);
  }

  .input__control:focus {
    outline: none;
  }

  .input__prefix,
  .input__suffix {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    cursor: default;
  }

  .input__prefix::slotted(nile-icon) {
    color: var(--nile-colors-neutral-700);
  }

  .input__suffix::slotted(nile-icon) {
    color: var(--nile-colors-neutral-700);
  }

  .input--standard:focus {
    border-radius: var(--nile-radius-sm, var(--ng-radius-md));
    border: 1px solid var(--nile-colors-primary-500);
    box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));
  }

  /*
   * Size modifiers
   */

  .input--small {
    border-radius: var(--nile-radius-sm, var(--ng-radius-md));
    font-size: var(--nile-input-font-size-small);
    height: 1.875rem;
  }

  .input--small .input__control {
    height: calc(1.875rem);
    padding: var(--nile-spacing-none, var(--ng-spacing-none)) var(--nile-spacing-xsmall, var(--ng-spacing-lg));
  }

  .input--small .input__clear {
    width: calc(1em + 0.75rem * 2);
  }

  .input--small .input__password-toggle {
    width: calc(1em + 0.75rem * 2);
  }

  .input--small .input__prefix::slotted(*) {
    margin-inline-start: var(--nile-spacing-xsmall, var(--ng-spacing-lg));
  }

  .input--small .input__suffix::slotted(*) {
    margin-inline-end: var(--nile-spacing-xsmall, var(--ng-spacing-lg));
  }

  .input--medium {
    font-size: var(--nile-font-size-rem-large);
    height: var(--nile-height-40px, var(--ng-height-auto));
    border-radius: var(--nile-radius-sm, var(--ng-radius-md));
  }

  .input--medium .input__control {
    height: var(--nile-type-scale-3, var(--ng-height-auto));
    padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));
  }

  .input--medium .input__clear {
    width: calc(1em + 1rem * 2);
  }

  .input--medium .input__password-toggle {
    width: calc(1em + 1rem * 2);
  }

  .input--medium .input__prefix::slotted(*) {
    margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));
  }

  .input--medium .input__suffix::slotted(*) {
    margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-lg));
  }

  .input--large {
    border-radius: var(--nile-radius-sm, var(--ng-radius-md));
    font-size: var(--nile-type-scale-6);
    height: 3.125rem;
  }

  .input--large .input__control {
    height: calc(3.125rem - 1px * 2);
    padding: var(--nile-spacing-none) var(--nile-spacing-xl);
  }

  .input--large .input__clear {
    width: calc(1em + 1.25rem * 2);
  }

  .input--large .input__password-toggle {
    width: calc(1em + 1.25rem * 2);
  }

  .input--large .input__prefix::slotted(*) {
    margin-inline-start: var(--nile-spacing-small, var(--ng-spacing-lg));
  }

  .input--large .input__suffix::slotted(*) {
    margin-inline-end: var(--nile-spacing-small, var(--ng-spacing-lg));
  }

  /*
   * Pill modifier
   */

  .input--pill.input--small {
    border-radius:var(--nile-radius-3xl, var(--ng-spacing-lg));
  }

  .input--pill.input--medium {
    border-radius: var(--nile-radius-4xl, var(--ng-spacing-lg));
  }

  .input--pill.input--large {
    border-radius: var(--nile-radius-4xl, var(--ng-spacing-lg));
  }

  /*
   * Clearable + Password Toggle
   */

  .input__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    color: var(--nile-colors-neutral-700);
    border: none;
    background: none;
    padding: var(--nile-spacing-none);
    transition: 150ms color;
    cursor: pointer;
  }

  .input__password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    color: var(--nile-colors-neutral-700);
    border: none;
    background: none;
    padding: var(--nile-spacing-none);
    transition: 150ms color;
    cursor: pointer;
  }

  .input__clear:hover {
    color: var(--nile-colors-neutral-700);
  }

  .input__password-toggle:hover {
    color: var(--nile-colors-neutral-700);
  }

  .input__clear:focus,
  .input__password-toggle:focus {
    outline: none;
  }

  .input--empty .input__clear {
    visibility: hidden;
  }

  /* Don't show the browser's password toggle in Edge */
  ::-ms-reveal {
    display: none;
  }

  /* Hide the built-in number spinner */
  .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button,
  .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    display: none;
  }

  .input--no-spin-buttons input[type='number'] {
    -moz-appearance: textfield;
  }

  :host([no-border]) .input--standard {
    border: none;
    box-shadow: 0 0 0 0;
  }

  :host([no-outline]) .input--standard {
    outline: var(--nile-outline-unset, var(--ng-outline-none));
  }

  :host([no-border]) .input--standard:hover:not(.input--disabled) {
    border: none;
    box-shadow: 0 0 0 0;
  }

  :host([no-border]) .input--standard.input--focused:not(.input--disabled) {
    border: none;
    box-shadow: 0 0 0 0;
  }

  :host([no-border]) .input--standard.input--focused:not(.input--disabled) {
    border: none;
    box-shadow: 0 0 0 0;
  }

  .input__password {
    font-family: var(--nile-font-family-disc, var(--ng-font-family-body));
    letter-spacing: var(--nile-spacing-xxs, var(--ng-spacing-none));
  }

  .input__non-printable {
    border-radius: var(--nile-radius-sm);
    max-width: 400px;
    background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
    border: 1px solid var(--nile-colors-red-500);
    color: var(--nile-colors-red-500);
    padding: var(--nile-spacing-10px);
    font-size: var(--nile-type-scale-2);
    max-height: 300px;
    overflow-y: scroll;
    line-height: var(--nile-type-scale-4);
  }

  .input__remove-non-printable {
    color: var(--nile-colors-red-500);
    margin-left: var(--nile-spacing-10px);
    font-size: var(--nile-type-scale-3);
    color: var(--nile-colors-dark-900);
    cursor: pointer;
  }

  .input__srtiked-text-container {
    margin-top: var(--nile-spacing-xs);
    color: var(--nile-colors-dark-900);
    word-break: break-all;
    line-height: var(--nile-type-scale-4);
  }

  .input__srtiked-text {
    text-decoration: line-through;
    text-decoration-color: var(--nile-colors-white-base);
    color: var(--nile-colors-white-base);
    background-color: var(--nile-colors-red-500);
  }
`;
export default [styles];
//# sourceMappingURL=nile-input.css.js.map