.grid-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  height: 2.5rem;

  .control-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
  }

  // Search container styles
  .search-container {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    width: 320px;
    height: 36px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    position: relative;

    &.has-content {
      svg {
        color: var(--accent-color);
      }
    }

    &:focus-within {
      background-color: rgba(255, 255, 255, 0.06);

      svg {
        color: var(--accent-color);
      }
    }

    svg {
      flex-shrink: 0;
      width: 16px;
      height: 16px;
      color: #6b7280;
      transition: color 0.2s ease;
    }

    .search-input {
      border: none;
      background: transparent;
      outline: none;
      font-size: 14px;
      color: #f9fafb;
      width: 100%;
      height: 100%;
      margin-left: 0.5rem;
      padding-right: 6.5rem; /* Add padding for the close button */

      &::placeholder {
        color: #6b7280;
        font-weight: 400;
        font-size: 14px;
      }
    }

    /* Close button styles */
    .close-button {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #6b7280;
      padding: 0.25rem 0.5rem;
      border-radius: 0.25rem;
      transition: background-color 0.2s ease, color 0.2s ease;

      .close-label {
        font-size: 0.75rem;
        margin-right: 0.5rem;
        font-weight: 500;
      }

      &:hover {
        background-color: rgba(255, 255, 255, 0.06);
        color: #f9fafb;
      }

      i {
        font-size: 0.875rem;
      }
    }
  }

  // Size slider styles
  .size-slider {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
    height: 100%;

    .slider-label {
      margin-right: 0.75rem;
      font-size: 0.875rem;
      color: #6b7280;
    }

    .slider-track {
      position: relative;
      width: 80px;
      height: 36px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      .slider-input {
        width: 100%;
        height: 4px;
        -webkit-appearance: none;
        appearance: none;
        background: rgba(255, 255, 255, 0.1);
        outline: none;
        border-radius: 2px;

        &::-webkit-slider-thumb {
          -webkit-appearance: none;
          appearance: none;
          width: 16px;
          height: 16px;
          border-radius: 50%;
          background: var(--accent-color);
          cursor: pointer;
          border: 2px solid #1f2937;
          box-shadow: 0 0 0 2px rgba(104, 95, 255, 0.2);
          transition: all 0.2s ease;

          &:hover {
            background: #8372ff;
            transform: scale(1.1);
          }
        }

        &::-moz-range-thumb {
          width: 16px;
          height: 16px;
          border-radius: 50%;
          background: var(--accent-color);
          cursor: pointer;
          border: 2px solid #1f2937;
          box-shadow: 0 0 0 2px rgba(104, 95, 255, 0.2);
          transition: all 0.2s ease;

          &:hover {
            background: #8372ff;
            transform: scale(1.1);
          }
        }
      }
    }
  }

  // Dropdown container styles
  .dropdown-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 10;
  }
}
