// ==============================|| OVERRIDES - AUTOCOMPLETE ||============================== //

export default function Autocomplete() {
  return {
    MuiAutocomplete: {
      styleOverrides: {
        root: {
          '& .MuiOutlinedInput-root': {
            padding: '3px 9px'
          }
        },
        // Soft, rounded popup with comfortable option rows — matches the
        // SoftPaper used by the redesigned pages.
        paper: {
          borderRadius: 12,
          boxShadow: '0 18px 50px rgba(15, 23, 42, 0.18)',
          border: '1px solid #e2e8f0',
          overflow: 'hidden'
        },
        listbox: {
          padding: 6,
          '& .MuiAutocomplete-option': {
            borderRadius: 8,
            margin: '1px 0',
            '&[aria-selected="true"]': {
              backgroundColor: 'rgba(192, 18, 39, 0.08)'
            },
            '&.Mui-focused': {
              backgroundColor: 'rgba(192, 18, 39, 0.06)'
            }
          }
        },
        popupIndicator: {
          width: 'auto',
          height: 'auto'
        },
        clearIndicator: {
          width: 'auto',
          height: 'auto'
        }
      }
    }
  };
}
