@import './checkbox';
@import './chip';
@import './inputtext';
@import './iconfield';

.p-multiselect {
  @apply relative inline-flex cursor-pointer select-none rounded-md border border-surface-300 bg-surface-0 shadow-[0_1px_2px_0_rgba(18,18,23,0.05)] transition-colors duration-200 dark:border-surface-700 dark:bg-surface-950;
}

.p-multiselect:not(.p-disabled):hover {
  @apply border-surface-400 dark:border-surface-600;
}

.p-multiselect:not(.p-disabled).p-focus {
  @apply border-primary;
}

.p-multiselect.p-variant-filled {
  @apply bg-surface-50 dark:bg-surface-800;
}

.p-multiselect.p-invalid {
  @apply border-red-400 dark:border-red-300;
}

.p-multiselect.p-disabled {
  @apply cursor-default bg-surface-200 text-surface-500 opacity-100 dark:bg-surface-700 dark:text-surface-400;
}

.p-multiselect-dropdown {
  @apply flex w-10 shrink-0 items-center justify-center rounded-e-md bg-transparent text-surface-500 dark:text-surface-400;
}

.p-multiselect-clear-icon {
  @apply absolute end-10 top-1/2 -mt-2 text-surface-500 dark:text-surface-400;
}

.p-multiselect-label-container {
  @apply flex-auto overflow-hidden;
}

.p-multiselect-label {
  @apply flex items-center gap-1 overflow-hidden text-ellipsis whitespace-nowrap px-3 py-2 text-surface-700 dark:text-surface-0;
}

.p-multiselect-label.p-placeholder {
  @apply text-surface-500 dark:text-surface-400;
}

.p-multiselect.p-disabled .p-multiselect-label {
  @apply text-surface-500 dark:text-surface-400;
}

.p-multiselect-label-empty {
  @apply overflow-hidden opacity-0;
}

.p-multiselect .p-multiselect-overlay {
  @apply min-w-full;
}

.p-multiselect-overlay {
  @apply absolute left-0 top-0 rounded-md border border-surface-200 bg-surface-0 text-surface-700 shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1),0_2px_4px_-2px_rgba(0,0,0,0.1)] dark:border-surface-700 dark:bg-surface-900 dark:text-surface-0;
}

.p-multiselect-header {
  @apply flex items-center px-4 pb-1 pt-2;
}

.p-multiselect-header .p-checkbox {
  @apply me-2;
}

.p-multiselect-filter-container {
  @apply flex-auto;
}

.p-multiselect-filter {
  @apply w-full;
}

.p-multiselect-list-container {
  @apply overflow-auto;
}

.p-multiselect-list {
  @apply m-0 flex list-none flex-col gap-[2px] p-1;
}

.p-multiselect-option {
  @apply relative flex cursor-pointer items-center gap-2 overflow-hidden whitespace-nowrap rounded-sm border-none bg-transparent px-3 py-2 font-normal text-surface-700 transition-colors duration-200 dark:text-surface-0;
}

.p-multiselect-option:not(.p-disabled).p-focus {
  @apply bg-surface-100 text-surface-600 dark:bg-surface-800 dark:text-surface-0;
}

.p-multiselect-option-group {
  @apply m-0 bg-transparent px-3 py-2 font-semibold text-surface-500 dark:text-surface-400;
}

.p-multiselect-empty-message {
  @apply px-3 py-2;
}

.p-multiselect-label .p-chip {
  @apply rounded-sm py-1;
}

.p-multiselect-label:has(.p-chip) {
  @apply px-[0.375rem] py-1;
}

.p-multiselect-fluid {
  @apply flex;
}

.p-multiselect-sm .p-multiselect-label {
  @apply px-[0.625rem] py-[0.375rem] text-sm;
}

.p-multiselect-sm .p-multiselect-dropdown .p-icon {
  @apply h-[0.875rem] w-[0.875rem] text-sm;
}

.p-multiselect-lg .p-multiselect-label {
  @apply px-[0.875rem] py-[0.625rem] text-lg;
}

.p-multiselect-lg .p-multiselect-dropdown .p-icon {
  @apply h-[1.125rem] w-[1.125rem] text-lg;
}
