{
  lib,
  config,
  ...
}: let
  inherit (lib) mkIf mkEnableOption catppuccin;
  cfg = config.horseman.dots.wofi;
  username = config.horseman.username;
  colors = config.horseman.catppuccin.colors;
  accent = config.horseman.catppuccin.accent;
in {
  options = {
    horseman.dots.wofi = {
      enable = mkEnableOption "~/.config/wofi/style.css";
    };
  };

  config = mkIf cfg.enable {
    home-manager.users.${username}.xdg.configFile."wofi/style.css".text = ''
      * {
        font-family: 'Inconsolata Nerd Font', monospace;
        font-size: 14px;
      }

      /* Window */
      window {
        margin: 0px;
        padding: 10px;
        border: 3px solid ${catppuccin.toHex colors.${accent}};
        border-radius: 10px;
        background-color: ${catppuccin.toRGBA colors.base 0.99};
        /* animation: slideIn 0.5s ease-in-out both; */
      }

      /* Slide In */
      @keyframes slideIn {
        0% {
           opacity: 0;
        }

        100% {
           opacity: 1;
        }
      }

      /* Inner Box */
      #inner-box {
        margin: 5px;
        padding: 10px;
        border: none;
        background-color: ${catppuccin.toHex colors.base};
        /* animation: fadeIn 0.5s ease-in-out both; */
      }

      /* Fade In */
      @keyframes fadeIn {
        0% {
           opacity: 0;
        }

        100% {
           opacity: 1;
        }
      }

      /* Outer Box */
      #outer-box {
        margin: 5px;
        padding: 10px;
        border: none;
        background-color: ${catppuccin.toHex colors.base};
      }

      /* Scroll */
      #scroll {
        margin: 0px;
        padding: 10px;
        border: none;
        background-color: ${catppuccin.toHex colors.base};
      }

      /* Input */
      #input {
        margin: 5px 20px;
        padding: 10px;
        border: 2px solid ${catppuccin.toHex colors.${accent}};
        border-radius: 10px;
        color: ${catppuccin.toHex colors.text};
        background-color: ${catppuccin.toHex colors.base};
        /* animation: fadeIn 0.5s ease-in-out both; */
      }

      #input image {
        border: none;
        color: ${catppuccin.toHex colors.red};
      }

      #input * {
        outline: 4px solid ${catppuccin.toHex colors.red}!important;
      }

      /* Text */
      #text {
        margin: 5px;
        border: none;
        color: ${catppuccin.toHex colors.text};
        /* animation: fadeIn 0.5s ease-in-out both; */
      }

      #entry {
        background-color: ${catppuccin.toHex colors.base};
      }

      #entry arrow {
        border: none;
        color: ${catppuccin.toHex colors.${accent}};
      }

      /* Selected Entry */
      #entry:selected arrow {
        overflow: hidden;
        color: ${catppuccin.toHex colors.mauve};
      }

      #entry:selected {
        border: 1px solid ${catppuccin.toHex colors.${accent}};
        border-radius: 10px;
      }

      #entry:selected #text {
        color: ${catppuccin.toHex colors.mauve};
      }

      #entry:drop(active) {
        background-color: ${catppuccin.toHex colors.${accent}}!important;
      }
    '';
  };
}
